summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index 2857c088a2..dfcaa94d15 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -1410,6 +1410,14 @@ class TestM17N < Test::Unit::TestCase
assert_equal(true, s.valid_encoding?)
s << "\xff".force_encoding("utf-16be")
assert_equal(false, s.valid_encoding?, bug4018)
+
+ bug6190 = '[ruby-core:43557]'
+ s = "\xe9"
+ s = s.encode("utf-8", "utf-8")
+ assert_equal(false, s.valid_encoding?, bug6190)
+ s = "\xe9"
+ s.encode!("utf-8", "utf-8")
+ assert_equal(false, s.valid_encoding?, bug6190)
end
def test_getbyte