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/lib | |
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/lib')
-rw-r--r-- | test/lib/envutil.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lib/envutil.rb b/test/lib/envutil.rb index a0b907c245..93b6b8e98b 100644 --- a/test/lib/envutil.rb +++ b/test/lib/envutil.rb @@ -3,6 +3,12 @@ require "open3" require "timeout" require_relative "find_executable" +require "rbconfig/sizeof" + +class Integer + FIXNUM_MIN = -(1 << (8 * RbConfig::SIZEOF['long'] - 2)) + FIXNUM_MAX = (1 << (8 * RbConfig::SIZEOF['long'] - 2)) - 1 +end module EnvUtil def rubybin |