mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
compar.c: use Module#to_s
* compar.c (rb_cmperr): use Module#to_s so that names in a message can be overridden by to_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dafeb23e99
commit
3118c4c46e
2 changed files with 3 additions and 3 deletions
|
@ -73,7 +73,7 @@ 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")}
|
||||
e = EnvUtil.labeled_class("E\u{30a8 30e9 30fc}")
|
||||
assert_raise_with_message(ArgumentError, /E\u{30a8 30e9 30fc}/) {
|
||||
1.0 < e.new
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue