diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-10-08 11:21:20 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-10-08 11:21:20 +0900 |
commit | 11b6ff12af99b177979c7a4f57f49b91a50fcc0c (patch) | |
tree | 459c2257a9807fd8f4fee77962a65cf09a080a74 /test/-ext- | |
parent | dd0c75fdc2104a6ba38b68d4431a572504a3bbc2 (diff) | |
download | ruby-11b6ff12af99b177979c7a4f57f49b91a50fcc0c.tar.gz |
more use of RbConfig::LIMITS
`8 * RbConfig::SIZEOF` ... is not straight.
Diffstat (limited to 'test/-ext-')
-rw-r--r-- | test/-ext-/string/test_modify_expand.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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 |