From 8fb17f86d7ef2a84f82c83a9509e311a07aa93fc Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Tue, 7 Jan 2025 05:06:02 +0900 Subject: =?UTF-8?q?[Bug=20#21006]=20Fix=20defined=5Fexpr=20compilation=20o?= =?UTF-8?q?f=20method=20call=20with=20parenth=E2=80=A6=20(#12518)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Bug #21006] Fix defined_expr compilation of method call with parenthesized receiver --- test/ruby/test_compile_prism.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3