Index: vm.c =================================================================== --- vm.c (revision 41200) +++ vm.c (working copy) @@ -2181,7 +2181,7 @@ static VALUE m_core_hash_merge_kwd(VALUE recv, VALUE hash, VALUE kw) { - kw = rb_convert_type(kw, T_HASH, "Hash", "to_hash"); + kw = rb_Hash(kw); rb_hash_foreach(kw, kwmerge_i, hash); return hash; } Index: test/ruby/test_keyword.rb =================================================================== --- test/ruby/test_keyword.rb (revision 41200) +++ test/ruby/test_keyword.rb (working copy) @@ -8,6 +8,9 @@ def test_f1 assert_equal(["foo", 424242], f1) + assert_equal(["foo", 424242], f1(**nil)) + assert_equal(["foo", 424242], f1(**[])) + assert_equal(["foo", 424242], f1(**{})) assert_equal(["bar", 424242], f1(str: "bar")) assert_equal(["foo", 111111], f1(num: 111111)) assert_equal(["bar", 111111], f1(str: "bar", num: 111111))