diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_encoding.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb index de96ebd17d..ef2dc39c4d 100644 --- a/test/ruby/test_encoding.rb +++ b/test/ruby/test_encoding.rb @@ -109,5 +109,8 @@ class TestEncoding < Test::Unit::TestCase ua = "abc".force_encoding(Encoding::UTF_8) assert_equal(Encoding::UTF_8, Encoding.compatible?(ua, :abc)) assert_equal(nil, Encoding.compatible?(ua, 1)) + bin = "a".force_encoding(Encoding::ASCII_8BIT) + asc = "b".force_encoding(Encoding::US_ASCII) + assert_equal(Encoding::ASCII_8BIT, Encoding.compatible?(bin, asc)) end end |