diff options
| author | eileencodes <eileencodes@gmail.com> | 2023-12-04 15:40:43 -0500 |
|---|---|---|
| committer | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-04 16:45:18 -0500 |
| commit | 7d371ca25d8e8f6524894be4413484cc9b04cb72 (patch) | |
| tree | 4154b755aed9716d5081acd2f7c59335aef08723 /include/ruby | |
| parent | 09e8d37f5b60f1cd1076c354128309cdf74d0df7 (diff) | |
[PRISM] Handle percent literals for `defined?`
Tests all the possible percent literal with `defined?`. Implements the
missing `PM_X_STRING_NODE` for the `%x` literal.
Code:
```ruby
defined?(%x[1,2,3])
```
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,19)>
0000 putobject "expression"
0002 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,19)>
0000 putobject "expression"
0002 leave
```
Diffstat (limited to 'include/ruby')
0 files changed, 0 insertions, 0 deletions
