mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add regression test for extended table bounds check
This commit is contained in:
parent
980aa329b6
commit
0ebb072f9f
1 changed files with 20 additions and 0 deletions
|
@ -177,3 +177,23 @@ assert_normal_exit %q{
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Test that getinstancevariable codegen checks for extended table size
|
||||||
|
assert_equal "nil\n", %q{
|
||||||
|
class A
|
||||||
|
def read
|
||||||
|
@ins1000
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
ins = A.new
|
||||||
|
other = A.new
|
||||||
|
10.times { other.instance_variable_set(:"@otr#{_1}", 'value') }
|
||||||
|
1001.times { ins.instance_variable_set(:"@ins#{_1}", 'value') }
|
||||||
|
|
||||||
|
ins.read
|
||||||
|
ins.read
|
||||||
|
ins.read
|
||||||
|
|
||||||
|
p other.read
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue