summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--object.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6929a4d212..af7b5b581e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@ Fri Jul 21 21:21:08 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_call0): include funcalled methods in caller list.
fixed: [ruby-core:08290]
+Fri Jul 21 17:52:24 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * object.c (rb_cstr_to_dbl): "9_e8" should consider "_e8" as
+ trailing garbage so that it should return 9.0. [ruby-dev:29088]
+
Fri Jul 21 12:11:00 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb, lib/mkmf.rb (with_destdir): remove drive letter before
diff --git a/object.c b/object.c
index 0a02e0f7f9..398dc6a1a7 100644
--- a/object.c
+++ b/object.c
@@ -2071,10 +2071,10 @@ rb_cstr_to_dbl(const char *p, int badcheck)
/* remove underscores between digits */
if (n == buf || !ISDIGIT(n[-1])) goto bad;
while (*++p == '_');
- if (badcheck) {
- if (!ISDIGIT(*p)) goto bad;
+ if (!ISDIGIT(*p)) {
+ if (badcheck) goto bad;
+ break;
}
- continue;
}
*n++ = *p++;
}