aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_numeric.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-02 04:54:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-02 04:54:19 +0000
commit2df92ed933a10b6d95785a9a53280570d5097956 (patch)
tree313127bfefacec92441050897238f7ae26bf75a0 /test/ruby/test_numeric.rb
parentf9eea668786a0dfc6b4650708777ae135bbf8309 (diff)
downloadruby-2df92ed933a10b6d95785a9a53280570d5097956.tar.gz
test: use RbConfig::Limits
* test/lib/envutil.rb: rbconfig/sizeof may not be available when cross-compiling. use RbConfig::Limits instead of calculating limits of Fixnum with hard-coded CHAR_BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_numeric.rb')
-rw-r--r--test/ruby/test_numeric.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_numeric.rb b/test/ruby/test_numeric.rb
index 163d65334c..529ba70362 100644
--- a/test/ruby/test_numeric.rb
+++ b/test/ruby/test_numeric.rb
@@ -258,7 +258,7 @@ class TestNumeric < Test::Unit::TestCase
end
def test_step
- bignum = Integer::FIXNUM_MAX + 1
+ bignum = RbConfig::Limits['FIXNUM_MAX'] + 1
assert_raise(ArgumentError) { 1.step(10, 1, 0) { } }
assert_raise(ArgumentError) { 1.step(10, 1, 0).size }
assert_raise(ArgumentError) { 1.step(10, 0) { } }