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 | 3b6c4dad0c0e3e7a27fd1e89f9cf9579e9f53079 (patch) | |
tree | 585115bcfb27e47356a0d242c64fe3997ae614b5 /test/ruby/test_integer.rb | |
parent | 45c593d89ee29253e6c98427f58f32d55ff55aa1 (diff) | |
download | ruby-3b6c4dad0c0e3e7a27fd1e89f9cf9579e9f53079.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/ruby/test_integer.rb')
-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 |