From eb301d8aecf454681e78cd7ad6d027e67b121857 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 22 Nov 2021 12:20:38 +0100 Subject: [PATCH] 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. --- test/ruby/test_iseq.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 816875e6fc..371398134e 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -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: