diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bignum.c | 7 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Wed Mar 19 14:36:40 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * bignum.c (rb_cstr_to_inum): treat successive underscores as + nondigit. [ruby-dev:34089] + Wed Mar 19 00:01:23 2008 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp> * lib/erb.rb (ERB::Compiler): Make some minor code optimization. @@ -512,10 +512,11 @@ rb_cstr_to_inum(str, base, badcheck) for (i=len;i--;) zds[i]=0; while ((c = *str++) != 0) { if (c == '_') { - if (badcheck) { - if (nondigit) goto bad; - nondigit = c; + if (nondigit) { + if (badcheck) goto bad; + break; } + nondigit = c; continue; } else if ((c = conv_digit(c)) < 0) { |