diff options
author | wanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-10 08:01:09 +0000 |
---|---|---|
committer | wanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-10 08:01:09 +0000 |
commit | ee4041385d4d8e56b374af951913112c6c9b23cb (patch) | |
tree | 183a148ca3a5347edc5d040c3ba566c113bef397 | |
parent | 1deb91e561aae5794a9f21f746f34639331df6f5 (diff) | |
download | ruby-ee4041385d4d8e56b374af951913112c6c9b23cb.tar.gz ruby-ee4041385d4d8e56b374af951913112c6c9b23cb.tar.xz ruby-ee4041385d4d8e56b374af951913112c6c9b23cb.zip |
* util.c (ruby_strtod): ruby_strtod don't allow a trailing
decimal point like "7.". [ruby-dev:34835] [ruby-dev:35009]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | util.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Jun 10 16:00:29 2008 wanabe <s.wanabe@gmail.com> + + * util.c (ruby_strtod): ruby_strtod don't allow a trailing + decimal point like "7.". [ruby-dev:34835] [ruby-dev:35009] + Tue Jun 10 13:48:38 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * rational.c (nurat_s_convert): need not to initialize optional @@ -2263,6 +2263,8 @@ break2: } #endif if (c == '.') { + if (!ISDIGIT(s[1])) + goto dig_done; c = *++s; if (!nd) { for (; c == '0'; c = *++s) |