From 7c4e3ca27b0263dff770fc52a451a00a30e5aa9d Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Mon, 23 Oct 2023 10:33:38 -0300 Subject: [PRISM] Fix AssocSplat node This commit emits the correct instructions for hashes which have both AssocSplat and Assoc nodes contained within them --- test/ruby/test_compile_prism.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 1e69982148..74efd36ce2 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -369,8 +369,9 @@ module Prism end def test_AssocSplatNode - # TODO: - # test_prism_eval("foo = { a: 1 }; { **foo }") + test_prism_eval("foo = { a: 1 }; { **foo }") + test_prism_eval("foo = { a: 1 }; bar = foo; { **foo, b: 2, **bar, c: 3 }") + test_prism_eval("foo = { a: 1 }; { b: 2, **foo, c: 3}") end def test_HashNode -- cgit v1.2.3