From 340f07e17e4cd0c751828e776cc7e36ee78d1485 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Sun, 15 Jun 2008 14:20:00 +0000 Subject: merge revision(s) 16570: * object.c (rb_cstr_to_dbl): should clear errno before calling strtod(3). [ruby-dev:34834] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ object.c | 1 + version.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a48da8bd71..7172ed3a7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 15 23:19:53 2008 Yukihiro Matsumoto + + * object.c (rb_cstr_to_dbl): should clear errno before calling + strtod(3). [ruby-dev:34834] + Sun Jun 15 23:18:15 2008 Yukihiro Matsumoto * marshal.c (marshal_load): should initialize arg.data used for diff --git a/object.c b/object.c index 5b2a255d0c..60df9b3386 100644 --- a/object.c +++ b/object.c @@ -2281,6 +2281,7 @@ rb_cstr_to_dbl(p, badcheck) else { while (ISSPACE(*p) || *p == '_') p++; } + errno = 0; d = strtod(p, &end); if (errno == ERANGE) { OutOfRange(); diff --git a/version.h b/version.h index d2dd08d855..5d9f71dfff 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-06-15" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20080615 -#define RUBY_PATCHLEVEL 215 +#define RUBY_PATCHLEVEL 216 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 -- cgit v1.2.3