1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezing

preceeding 0s.  [ruby-core:13873]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-12-04 02:23:52 +00:00
parent 08494c8643
commit 80644b31d5
4 changed files with 12 additions and 4 deletions

View file

@ -667,5 +667,8 @@ class TestInteger < Test::Unit::TestCase
assert_raise(ArgumentError) { Integer("4611686018427387904 :") }
assert_equal(0x4000000000000000, Integer("46_11_686_0184273_87904"))
assert_raise(ArgumentError) { Integer("\0") }
assert_nothing_raised(ArgumentError, "[ruby-core:13873]") {
assert_equal(0, Integer("0 "))
}
end
end