Add an extra failing test case for [Bug #18250]
The parameter being called `req` specifically causes an assertion error: ``` Assertion failed: (key != 0), function hash_table_raw_insert, file id_table.c, line 153. ``` Renaming the parameter or removing the `*` doesn't reproduce.
This commit is contained in:
parent
c0c2b31a35
commit
eb301d8aec
Notes:
git
2021-11-23 21:03:50 +09:00
@ -105,6 +105,17 @@ class TestISeq < Test::Unit::TestCase
|
||||
assert_equal(42, ISeq.load_from_binary(iseq.to_binary).eval)
|
||||
end
|
||||
|
||||
def test_super_with_block_hash_0
|
||||
iseq = compile(<<~EOF)
|
||||
# [Bug #18250] `req` specifically cause `Assertion failed: (key != 0), function hash_table_raw_insert`
|
||||
def touch(req, *)
|
||||
foo { super }
|
||||
end
|
||||
42
|
||||
EOF
|
||||
assert_equal(42, ISeq.load_from_binary(iseq.to_binary).eval)
|
||||
end
|
||||
|
||||
def test_super_with_block_and_kwrest
|
||||
iseq = compile(<<~EOF)
|
||||
def touch2(**) # :nodoc:
|
||||
|
Loading…
x
Reference in New Issue
Block a user