summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2021-11-22 12:20:38 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-11-23 21:03:19 +0900
commiteb301d8aecf454681e78cd7ad6d027e67b121857 (patch)
treef71d196cd33f012c8e1bbfc304cd108d682336b7 /test
parentc0c2b31a35e19a47b499b57807bc0a0f9325f6d3 (diff)
downloadruby-eb301d8aecf454681e78cd7ad6d027e67b121857.tar.gz
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.
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_iseq.rb11
1 files changed, 11 insertions, 0 deletions
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: