diff options
| author | Stan Lo <stan.lo@shopify.com> | 2025-07-17 12:29:40 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-07-29 17:18:41 +0000 |
| commit | 2eab962c538424863e34dc20fa13e25b058dc6b5 (patch) | |
| tree | 1f963cb092df3cfdf40ad0fd6b14989699da2108 /doc | |
| parent | 026079925c2ce7ff660d5e1ba8e2e0d7b0cc6b02 (diff) | |
[ruby/prism] Allow command calls in endless method bodies within assignments
Previously, endless method definitions in assignment contexts like
`x = def f = p 1` would fail to parse because command calls (method
calls without parentheses) were only accepted when the surrounding
binding power was less than `PM_BINDING_POWER_COMPOSITION`.
This fix specifically checks for assignment context and allows command
calls in those cases while maintaining the existing behavior for other
contexts. This ensures that:
- `x = def f = p 1` parses correctly (previously failed)
- `private def f = puts "Hello"` still produces the expected error
https://github.com/ruby/prism/commit/722af59ba3
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions
