diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_string.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 6c73a7ccc7..e988f99629 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -170,8 +170,9 @@ class TestString < Test::Unit::TestCase o = Object.new def o.to_str; "bar"; end - assert_nil("foo" <=> o) + assert_equal(1, "foo" <=> o) + class << o;remove_method :to_str;end def o.<=>(x); nil; end assert_nil("foo" <=> o) |