From 4191a6b90d3eeb63a31609dba29a1904efee3738 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 28 Sep 2015 02:40:46 +0000 Subject: preserve encodings in error messages git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_bignum.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby/test_bignum.rb') diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index 012a5624d0..d057e39dbd 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -568,6 +568,8 @@ class TestBignum < Test::Unit::TestCase def test_coerce assert_equal([T64P, T31P], T31P.coerce(T64P)) assert_raise(TypeError) { T31P.coerce(nil) } + obj = eval("class C\u{1f5ff}; self; end").new + assert_raise_with_message(TypeError, /C\u{1f5ff}/) { T31P.coerce(obj) } end def test_abs -- cgit v1.2.3