aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_comparable.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-19 04:59:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-19 04:59:44 +0000
commit40db3d97ac03c8346fff14aa98340a68e79e85a5 (patch)
treeec5dc29aa65ce82e219fee4dc4ca117b0cf3a0b2 /test/ruby/test_comparable.rb
parentf9b7a2a33fa708ea220f26bd094a8b26c2da059c (diff)
downloadruby-40db3d97ac03c8346fff14aa98340a68e79e85a5.tar.gz
compar.c: preserve encodings
* compar.c (rb_cmperr): preserve encodings of arguments in the message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_comparable.rb')
-rw-r--r--test/ruby/test_comparable.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_comparable.rb b/test/ruby/test_comparable.rb
index 05426af139..1c3cbeaf1a 100644
--- a/test/ruby/test_comparable.rb
+++ b/test/ruby/test_comparable.rb
@@ -73,6 +73,10 @@ class TestComparable < Test::Unit::TestCase
def test_err
assert_raise(ArgumentError) { 1.0 < nil }
assert_raise(ArgumentError) { 1.0 < Object.new }
+ e = Module.new {break module_eval("class E\u{30a8 30e9 30fc}; self; end")}
+ assert_raise_with_message(ArgumentError, /E\u{30a8 30e9 30fc}/) {
+ 1.0 < e.new
+ }
end
def test_inversed_compare