summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-29 17:44:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-29 17:44:15 +0000
commit3e6c35c6600ed0f96c4fbcf9204d9de2afd19cba (patch)
tree79a730fa583c307e5dbec821b0348744dbacc1f1
parentd45010b150b552c81b00ba62d69148bbba8b5a92 (diff)
downloadruby-3e6c35c6600ed0f96c4fbcf9204d9de2afd19cba.tar.gz
ruby-3e6c35c6600ed0f96c4fbcf9204d9de2afd19cba.tar.xz
ruby-3e6c35c6600ed0f96c4fbcf9204d9de2afd19cba.zip
* test/ruby/test_bignum.rb (test_too_big_to_s): skips a test using too
large memory. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_bignum.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb
index be33e2f5a..9cf80e14f 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)