summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n_comb.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-16 16:26:04 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-16 16:26:04 +0000
commit4f78e7fff4949f5c94d35bce6b610d1188fd7c27 (patch)
tree71b824f19970d48f1af8718d703ef14fb4103227 /test/ruby/test_m17n_comb.rb
parent0b6a0045aaf8de72b4ce39fe117b2ba88ccdcc15 (diff)
* parse.y (rb_intern3): prohibit Symbol with an invalid encoding.
[ruby-core:24621] * test/ruby/test_m17n_comb.rb: modify a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n_comb.rb')
-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