Add regression test for extended table bounds check
This commit is contained in:
parent
980aa329b6
commit
0ebb072f9f
@ -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…
x
Reference in New Issue
Block a user