mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
more use of RbConfig::LIMITS
`8 * RbConfig::SIZEOF` ... is not straight.
This commit is contained in:
parent
dd0c75fdc2
commit
11b6ff12af
2 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue