From 0c814092ee1268562b4ba42973ea754e0dcf1bd0 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Tue, 16 Jan 2024 15:10:39 -0500 Subject: [Prism] Implement defined for PM_NEXT_NODE Ruby code: ```ruby defined?(next) ``` Instructions ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(59,15)> 0000 putobject "expression" ( 59)[Li] 0002 leave "********* PRISM *************" == disasm: #@:58 (58,0)-(58,15)> 0000 putobject "expression" ( 58)[Li] 0002 leave ``` Related: ruby/prism#2188 --- test/ruby/test_compile_prism.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 9b4e998b27..18ad6d1c08 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -218,6 +218,8 @@ module Prism defined?(PrismDefinedNode.new.m1) RUBY + + assert_prism_eval("defined?(next)") end def test_GlobalVariableReadNode -- cgit v1.2.3