diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index d4a38054ad..ed722f57f2 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -175,11 +175,11 @@ class TestString < Test::Unit::TestCase def o.<=>(x); nil; end assert_nil("foo" <=> o) - class<;end + class << o;undef <=>;end def o.<=>(x); 1; end assert_equal(-1, "foo" <=> o) - class<;end + class << o;undef <=>;end def o.<=>(x); 2**100; end assert_equal(-(2**100), "foo" <=> o) end @@ -202,7 +202,7 @@ class TestString < Test::Unit::TestCase def o.to_str; end def o.==(x); false; end assert_equal(false, "foo" == o) - class<