From 1dbc720c0d91bfdb39dbef75606d5cd4ef4d9884 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 30 Nov 2012 08:43:42 +0000 Subject: string.c: always fixed value * string.c (rb_str_cmp_m): return fixed value, one of -1,0,+1 always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index e4e6c39663..6c73a7ccc7 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -181,7 +181,7 @@ class TestString < Test::Unit::TestCase class << o;remove_method :<=>;end def o.<=>(x); 2**100; end - assert_equal(-(2**100), "foo" <=> o) + assert_equal(-1, "foo" <=> o) end def test_EQUAL # '==' -- cgit v1.2.3