aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_m17n_comb.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb
index ab891363b1..cf80377172 100644
--- a/test/ruby/test_m17n_comb.rb
+++ b/test/ruby/test_m17n_comb.rb
@@ -1040,10 +1040,12 @@ class TestM17NComb < Test::Unit::TestCase
STRINGS.each {|s|
if /\0/ =~ a(s)
assert_raise(ArgumentError) { s.intern }
- else
+ elsif s.valid_encoding?
sym = s.intern
assert_equal(s, sym.to_s, "#{encdump s}.intern.to_s")
assert_equal(sym, s.to_sym)
+ else
+ assert_raise(EncodingError) { s.intern }
end
}
end