mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 15:06:10 +02:00
Check negative integer underflow
This commit is contained in:
parent
c08e1f336c
commit
02b70256b5
Notes:
git
2024-11-26 02:46:55 +00:00
2 changed files with 9 additions and 3 deletions
|
@ -164,6 +164,11 @@ CODE
|
|||
assert_raise(ArgumentError) { "foo"[] }
|
||||
end
|
||||
|
||||
def test_AREF_underflow
|
||||
require "rbconfig/sizeof"
|
||||
assert_equal(nil, S("\u{3042 3044 3046}")[RbConfig::LIMITS["LONG_MIN"], 1])
|
||||
end
|
||||
|
||||
def test_ASET # '[]='
|
||||
s = S("FooBar")
|
||||
s[0] = S('A')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue