diff options
| author | eileencodes <eileencodes@gmail.com> | 2023-12-05 13:47:46 -0500 |
|---|---|---|
| committer | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-06 09:46:19 -0500 |
| commit | 86497645229099f3a6d0f64b3bb85d215f04f5df (patch) | |
| tree | 41aef919ae1f1d3df6fb4140e59b80aec78453cc /test/ruby/test_rubyvm.rb | |
| parent | 02961fdbab0da97b2aa506b3e77d846d7e883ddc (diff) | |
[PRISM] Implement `PM_SPLAT_NODE` for `defined?`
In an array for `defined?` we need to check if there is a
`contains_splat` flag, if so bail early.
Ruby code:
```ruby
defined?([[*1..2], 3, *4..5])
```
Instructions:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,29)>
0000 putobject "expression"
0002 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,29)>
0000 putobject "expression"
0002 leave
```
Diffstat (limited to 'test/ruby/test_rubyvm.rb')
0 files changed, 0 insertions, 0 deletions
