summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2025-01-07 05:06:02 +0900
committerGitHub <noreply@github.com>2025-01-07 05:06:02 +0900
commit8fb17f86d7ef2a84f82c83a9509e311a07aa93fc (patch)
treeabfa3fc07a4bc87364f03d5c8993f86a5dd8bf34 /test/ruby
parent5698f4f2e1b8221a68989f881c03a41175736a8a (diff)
[Bug #21006] Fix defined_expr compilation of method call with parenth… (#12518)
[Bug #21006] Fix defined_expr compilation of method call with parenthesized receiver
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_compile_prism.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index 9135495d1d..546d549211 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -210,6 +210,9 @@ module Prism
# method chain with a block on the inside
assert_prism_eval("defined?(itself { 1 }.itself)")
+ # method chain with parenthesized receiver
+ assert_prism_eval("defined?((itself).itself)")
+
# Method chain on a constant
assert_prism_eval(<<~RUBY)
class PrismDefinedNode