ruby-changes:69879
From: Jean <ko1@a...>
Date: Tue, 23 Nov 2021 21:03:44 +0900 (JST)
Subject: [ruby-changes:69879] eb301d8aec (master): Add an extra failing test case for [Bug #18250]
https://git.ruby-lang.org/ruby.git/commit/?id=eb301d8aec From eb301d8aecf454681e78cd7ad6d027e67b121857 Mon Sep 17 00:00:00 2001 From: Jean Boussier <jean.boussier@g...> Date: Mon, 22 Nov 2021 12:20:38 +0100 Subject: 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 816875e6fc8..371398134e6 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -105,6 +105,17 @@ class TestISeq < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_iseq.rb#L105 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: -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/