diff options
| author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-10-23 10:33:38 -0300 |
|---|---|---|
| committer | Aaron Patterson <aaron.patterson@gmail.com> | 2023-10-23 13:15:52 -0700 |
| commit | 7c4e3ca27b0263dff770fc52a451a00a30e5aa9d (patch) | |
| tree | 0868254453ab34e6dcf6ad990918d0d6746f73dd /test/ruby | |
| parent | 062d6050b05dba8c0cc915e83a05a418a1c8ab1d (diff) | |
[PRISM] Fix AssocSplat node
This commit emits the correct instructions for hashes which have
both AssocSplat and Assoc nodes contained within them
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 |
