summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-12-15 20:07:49 +0000
committerKevin Newton <kddnewton@gmail.com>2023-12-15 16:15:10 -0500
commit161787f9beef96c9fa1057b6378fe7e048ac2ecd (patch)
tree47ce3ed24be72622763bd928cbc9797beb477be8 /test/ruby
parent5b6a4d8c1253fd1ab77c0539d33276fe1856cf24 (diff)
[PRISM] Compile CallTargetNode
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_compile_prism.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index 28adbe0916..70da238f7d 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -534,6 +534,30 @@ module Prism
assert_prism_eval("_, {}[:foo], _ = 1")
assert_prism_eval("_,{}[:foo], _, {}[:bar] = 1")
+ assert_prism_eval(<<~CODE)
+ class Foo
+ def bar=(x); end
+ def baz=(c); end
+ end
+ foo = Foo.new
+ foo.bar, foo.baz = 1
+ CODE
+ assert_prism_eval(<<~CODE)
+ class Foo
+ def bar=(x); end
+ def baz=(c); end
+ end
+ foo = Foo.new
+ _, foo.bar, foo.baz = 1
+ CODE
+ assert_prism_eval(<<~CODE)
+ class Foo
+ def bar=(x); end
+ def baz=(c); end
+ end
+ foo = Foo.new
+ _, foo.bar, _, foo.baz = 1
+ CODE
end
############################################################################