aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 07:52:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 07:52:34 +0000
commit6f58118e4c6b688aa8c78b5310c4e2c12c444537 (patch)
tree57f99bc9fb80b46674096e8c280abc9dd786df9c /test
parent0347b17b27af6ed50e270e52539424748f1cceac (diff)
downloadruby-6f58118e4c6b688aa8c78b5310c4e2c12c444537.tar.gz
* numeric.c (rb_enc_uint_chr): fix message format. Bug#4869
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_m17n.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index c4bc9e6637..f4d3dcbdad 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -1192,6 +1192,10 @@ class TestM17N < Test::Unit::TestCase
assert_equal([b].pack("C"), b.chr)
}
assert_equal("\x84\x31\xA4\x39".force_encoding("GB18030"), 0x8431A439.chr("GB18030"))
+ e = assert_raise(RangeError) {
+ 2206368128.chr(Encoding::UTF_8)
+ }
+ assert_not_match(/-\d+ out of char range/, e.message)
end
def test_marshal