diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-21 05:09:19 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-21 05:09:19 +0000 |
commit | 5821c7514836104b44892c046590b09d42d444b9 (patch) | |
tree | 71b36545d7e750f8704dedefd2b92b4ff4847d19 | |
parent | 165da0da2f185cab12ba68214de3b4f4ab81a46a (diff) | |
download | ruby-5821c7514836104b44892c046590b09d42d444b9.tar.gz |
revert r37710, requested by Tadayoshi Funaba [ruby-dev:46575]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bignum.c | 3 | ||||
-rw-r--r-- | test/ruby/test_string.rb | 2 |
3 files changed, 2 insertions, 8 deletions
@@ -308,11 +308,6 @@ Mon Nov 19 01:11:59 2012 Naohisa Goto <ngotogenome@gmail.com> * common.mk (vm.$(OBJEXT)): add dependency to probes_helper.h. * vm.c, vm_insnhelper.c: include probes_helper.h. -Sun Nov 18 20:46:08 2012 Tadayoshi Funaba <tadf@dotrb.org> - - * bignum.c (rb_cstr_to_inum): should accept underscores of - sequence of two or more when unchecked mode. - Sun Nov 18 16:33:00 2012 Naohisa Goto <ngotogenome@gmail.com> * configure.in, Makefile.in, common.mk: support DTrace on Solaris 10, @@ -733,8 +733,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck) if (badcheck) goto bad; break; } - if (badcheck) - nondigit = (char) c; + nondigit = (char) c; continue; } else if ((c = conv_digit(c)) < 0) { diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 9f63847da3..2beaef3504 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1513,7 +1513,7 @@ class TestString < Test::Unit::TestCase assert_equal(12, "1_2".to_i(10)) assert_equal(0x40000000, "1073741824".to_i(10)) assert_equal(0x4000000000000000, "4611686018427387904".to_i(10)) - assert_equal(12, "1__2".to_i(10)) + assert_equal(1, "1__2".to_i(10)) assert_equal(1, "1_z".to_i(10)) bug6192 = '[ruby-core:43566]' |