diff --git a/test/ruby/test_utf16.rb b/test/ruby/test_utf16.rb index bb44432846..3ffc8b86ec 100644 --- a/test/ruby/test_utf16.rb +++ b/test/ruby/test_utf16.rb @@ -65,4 +65,11 @@ class TestUTF16 < Test::Unit::TestCase Encoding.find("utf-8".force_encoding("utf-16be")) } end + + def test_interpolation + s = "aa".force_encoding("utf-16be") + assert_raise(ArgumentError, "\"a\#{#{encdump s}}\"") { + "a#{s}" + } + end end