aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compar.c4
-rw-r--r--test/ruby/test_comparable.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/compar.c b/compar.c
index a38668edf1..81dff38f49 100644
--- a/compar.c
+++ b/compar.c
@@ -24,10 +24,10 @@ rb_cmperr(VALUE x, VALUE y)
classname = rb_inspect(y);
}
else {
- classname = rb_class_path(rb_obj_class(y));
+ classname = rb_obj_class(y);
}
rb_raise(rb_eArgError, "comparison of %"PRIsVALUE" with %"PRIsVALUE" failed",
- rb_class_path(rb_obj_class(x)), classname);
+ rb_obj_class(x), classname);
}
static VALUE
diff --git a/test/ruby/test_comparable.rb b/test/ruby/test_comparable.rb
index 1c3cbeaf1a..1912472423 100644
--- a/test/ruby/test_comparable.rb
+++ b/test/ruby/test_comparable.rb
@@ -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
}