diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index b58cd576cf..7c37c8a199 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1465,6 +1465,8 @@ class TestM17N < Test::Unit::TestCase assert_equal(1, a.force_encoding("utf-8").size, '[ruby-core:22437]') b = "".force_encoding("ascii-8bit") << 0xC3.chr << 0xB6.chr assert_equal(1, b.force_encoding("utf-8").size, '[ruby-core:22437]') + + assert_raise(TypeError){ ''.force_encoding(nil) } end def test_combchar_codepoint