mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
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
This commit is contained in:
parent
f9b7a2a33f
commit
40db3d97ac
3 changed files with 14 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue