summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 08:08:14 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 08:08:14 +0000
commit858b8250fe840f08023d3ef965481ed6588fe928 (patch)
tree836affa376680206fad72cb8a8a645e2acaf29cf /util.c
parent6daec36d0cb2f7335e036b931728472e38f72841 (diff)
merge revision(s) 17074:
* util.c (ruby_strtod): ruby_strtod don't allow a trailing decimal point like "7.". [ruby-dev:34835] [ruby-dev:35009] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.c b/util.c
index 34a9fe731a..af6e689d0a 100644
--- a/util.c
+++ b/util.c
@@ -2165,6 +2165,8 @@ break2:
}
#endif
if (c == '.') {
+ if (!ISDIGIT(s[1]))
+ goto dig_done;
c = *++s;
if (!nd) {
for (; c == '0'; c = *++s)