summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2025-09-08 12:14:22 +0900
committergit <svn-admin@ruby-lang.org>2025-09-11 15:00:14 +0000
commite39fd456ac5c4c82e483431afc266b5066f00eba (patch)
treea1e99eef0fd329aad0e594875450baca7571be75 /test/ruby
parent17039c566b76854c8246b4a4feb2f5bd2ebf8447 (diff)
[ruby/prism] Use pm_arguments_end for function call
Previously, the location of CallNode was incorrect when it accepts a block parameter: ``` $ ruby -rprism -e 'pp Prism.parse("foo(&blk)").value.statements.body[0]'] @ CallNode (location: (1,0)-(1,8)) # <=== It should be (1,0)-(1,9) ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :foo ├── message_loc: (1,0)-(1,3) = "foo" ├── opening_loc: (1,3)-(1,4) = "(" ├── arguments: ∅ ├── closing_loc: (1,8)-(1,9) = ")" *snip* $ ruby -rprism -e 'pp Prism.parse("foo(&blk)").value.statements.body[0].slice' "foo(&blk" ``` Note that the slice lacks the closing parenthesis. https://github.com/ruby/prism/commit/3c22e6fc39
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions