diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-01 15:16:17 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-01 15:16:17 +0000 |
commit | de2f7416d2deb4166d78638a41037cb550d64484 (patch) | |
tree | 2481ed6dd9955cdeae6ac3dd5220ba4c9261aaec /test/ruby/test_optimization.rb | |
parent | f98c9a0aa63c5db16005709eff807dcad525bf57 (diff) |
envutil.rb defines Integer::{FIXNUM_MIN,FIXNUM_MAX}.
* test/lib/envutil.rb: Define Integer::{FIXNUM_MIN,FIXNUM_MAX}.
* test/ruby/test_bignum.rb: Use Integer::{FIXNUM_MIN,FIXNUM_MAX}.
* test/ruby/test_bignum.rb: Ditto.
* test/ruby/test_integer_comb.rb: Ditto.
* test/ruby/test_marshal.rb: Ditto.
* test/ruby/test_optimization.rb: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_optimization.rb')
-rw-r--r-- | test/ruby/test_optimization.rb | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 605e0306fa..6412d1f45e 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -3,20 +3,8 @@ require 'test/unit' require 'objspace' class TestRubyOptimization < Test::Unit::TestCase - - BIGNUM_POS_MIN_32 = 1073741824 # 2 ** 30 - if BIGNUM_POS_MIN_32.kind_of?(Fixnum) - FIXNUM_MAX = 4611686018427387903 # 2 ** 62 - 1 - else - FIXNUM_MAX = 1073741823 # 2 ** 30 - 1 - end - - BIGNUM_NEG_MAX_32 = -1073741825 # -2 ** 30 - 1 - if BIGNUM_NEG_MAX_32.kind_of?(Fixnum) - FIXNUM_MIN = -4611686018427387904 # -2 ** 62 - else - FIXNUM_MIN = -1073741824 # -2 ** 30 - end + FIXNUM_MAX = Integer::FIXNUM_MAX + FIXNUM_MIN = Integer::FIXNUM_MIN def assert_redefine_method(klass, method, code, msg = nil) assert_separately([], <<-"end;")# do |