aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2023-12-01 14:52:38 -0500
committerAaron Patterson <aaron.patterson@gmail.com>2023-12-01 14:56:25 -0800
commit818813c2bde674f85804891df380c271637c0c8e (patch)
tree0ff4413e7a71a5dcb2b0a41060cbc3acfa5ed3c3 /test
parent6ecc1ca9b1afc5e863f82db3bb23a1ef59469817 (diff)
downloadruby-818813c2bde674f85804891df380c271637c0c8e.tar.gz
Implement paren node for `defined?`
Implements and adds a test for passing a parentheses node to `defined?`.
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_compile_prism.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index c6047357b2..34abf982ae 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -150,6 +150,8 @@ module Prism
assert_prism_eval("x = 1; defined? x ||= 1")
assert_prism_eval("if defined? A; end")
+
+ assert_prism_eval("defined?(())")
end
def test_GlobalVariableReadNode