summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--util.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1259442d41..5f57f88490 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 10 17:01:58 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:40:25 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_thread_select), string.c (str_gsub): suppress warnings.
diff --git a/util.c b/util.c
index 4d96ae33a6..de18895cb7 100644
--- a/util.c
+++ b/util.c
@@ -2171,6 +2171,8 @@ break2:
}
#endif
if (c == '.') {
+ if (!ISDIGIT(s[1]))
+ goto dig_done;
c = *++s;
if (!nd) {
for (; c == '0'; c = *++s)