ruby-changes:5076
From: matz <ko1@a...>
Date: Sat, 24 May 2008 22:39:35 +0900 (JST)
Subject: [ruby-changes:5076] Ruby:r16571 (trunk): * object.c (rb_cstr_to_dbl): should clear errno before calling
matz 2008-05-24 22:39:18 +0900 (Sat, 24 May 2008)
New Revision: 16571
Modified files:
trunk/ChangeLog
trunk/object.c
Log:
* object.c (rb_cstr_to_dbl): should clear errno before calling
strtod(3). [ruby-dev:34834]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16571&r2=16570&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/object.c?r1=16571&r2=16570&diff_format=u
Index: ChangeLog
===================================================================
--- ChangeLog (revision 16570)
+++ ChangeLog (revision 16571)
@@ -1,3 +1,8 @@
+Sat May 24 22:32:49 2008 Yukihiro Matsumoto <matz@r...>
+
+ * object.c (rb_cstr_to_dbl): should clear errno before calling
+ strtod(3). [ruby-dev:34834]
+
Sat May 24 15:26:16 2008 Yusuke Endoh <mame@t...>
* compile.c (iseq_set_exception_table, NODE_WHILE, NODE_NEXT): remove
Index: object.c
===================================================================
--- object.c (revision 16570)
+++ object.c (revision 16571)
@@ -2045,6 +2045,7 @@
if (!p) return 0.0;
q = p;
while (ISSPACE(*p)) p++;
+ errno = 0;
d = strtod(p, &end);
if (errno == ERANGE) {
OutOfRange();
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/