diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-08 17:05:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-08 17:05:12 +0000 |
commit | 91595f8d60ee05f46527a11ecbb2534e0cb51dae (patch) | |
tree | 585115bcfb27e47356a0d242c64fe3997ae614b5 /test | |
parent | 7ec29f3fb744f29f3f7431b27a767894d232d9bd (diff) | |
download | ruby-91595f8d60ee05f46527a11ecbb2534e0cb51dae.tar.gz |
bignum.c: rb_cstr_parse_inum
* bignum.c (rb_cstr_parse_inum): [EXPERIMENTAL] new function to
parse integer in C-string with length. the name and the
arguments may be changed in the future.
* bignum.c (rb_str_to_inum): preserve encoding of the argument in
error messages, and no longer needs to copy non-terminated
strings.
* bignum.c (rb_str2big_{poweroftwo,normal,karatsuba,gmp}): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_integer.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb index 3f5fca75d7..a82562f887 100644 --- a/test/ruby/test_integer.rb +++ b/test/ruby/test_integer.rb @@ -98,6 +98,8 @@ class TestInteger < Test::Unit::TestCase assert_raise(Encoding::CompatibilityError, bug6192) {Integer("0".encode("utf-32be"))} assert_raise(Encoding::CompatibilityError, bug6192) {Integer("0".encode("utf-32le"))} assert_raise(Encoding::CompatibilityError, bug6192) {Integer("0".encode("iso-2022-jp"))} + + assert_raise_with_message(ArgumentError, /\u{1f4a1}/) {Integer("\u{1f4a1}")} end def test_int_p |