From 11b6ff12af99b177979c7a4f57f49b91a50fcc0c Mon Sep 17 00:00:00 2001 From: 卜部昌平 Date: Tue, 8 Oct 2019 11:21:20 +0900 Subject: more use of RbConfig::LIMITS `8 * RbConfig::SIZEOF` ... is not straight. --- test/-ext-/string/test_modify_expand.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/-ext-/string/test_modify_expand.rb') diff --git a/test/-ext-/string/test_modify_expand.rb b/test/-ext-/string/test_modify_expand.rb index b7f96426fc..9aa3b9a6ca 100644 --- a/test/-ext-/string/test_modify_expand.rb +++ b/test/-ext-/string/test_modify_expand.rb @@ -19,9 +19,8 @@ class Test_StringModifyExpand < Test::Unit::TestCase return if RbConfig::SIZEOF['size_t'] > RbConfig::SIZEOF['long'] bug12390 = '[ruby-core:75592] [Bug #12390]' s = Bug::String.new - long_max = (1 << (8 * RbConfig::SIZEOF['long'] - 1)) - 1 assert_raise(ArgumentError, bug12390) { - s.modify_expand!(long_max) + s.modify_expand!(RbConfig::LIMITS["LONG_MAX"]) } end end -- cgit v1.2.3