From ded94d1c8ca7b318aad0c92ca290d1b6b2f3814d Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 13 Oct 2010 19:17:49 +0000 Subject: * numeric.c (ruby_float_step): fix Numeric#step with infinity unit doesn't works well. [ruby-core:32779] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/ruby/test_string.rb') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index ed722f57f2..c024b58ed8 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 << o;undef <=>;end + class << o;remove_method :<=>;end def o.<=>(x); 1; end assert_equal(-1, "foo" <=> o) - class << o;undef <=>;end + class << o;remove_method :<=>;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 << o;undef ==;end + class << o;remove_method :==;end def o.==(x); true; end assert_equal(true, "foo" == o) end @@ -1818,7 +1818,7 @@ class TestString < Test::Unit::TestCase c.class_eval { attr 1 } end - class << o;undef to_str;end + class << o;remove_method :to_str;end def o.to_str; "foo"; end assert_nothing_raised do c.class_eval { attr o } -- cgit v1.2.3