diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_bignum.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index be33e2f5af..9cf80e14f4 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -379,9 +379,8 @@ class TestBignum < Test::Unit::TestCase end def test_too_big_to_s - i = 32 - while (big = 2**(i-1)-1).is_a?(Fixnum) - i *= 2 + if (big = 2**31-1).is_a?(Fixnum) + return end e = assert_raise(RangeError) {(1 << big).to_s} assert_match(/too big to convert/, e.message) |