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-17 16:06:34 +0000 |
| commit | 13de248f391ce41a83b86c61fc05202886296b57 (patch) | |
| tree | b6eb50821cd3f6c4e0c1f8df4f407c702efea667 /include/ruby/backward.h | |
| parent | a46309d19a321b110bbb5a7887b8bf94eb1ae63f (diff) | |
[ruby/prism] Allow command calls in endless method bodies regardless of context
Previously, endless method definitions 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` (8). In assignment contexts with binding
power 18, this condition was false, causing parse errors.
This fix ensures command calls are always accepted in endless method
bodies by passing `true` for `accepts_command_call`, making the method
body parse consistently regardless of where the method is defined.
https://github.com/ruby/prism/commit/70413ed4dd
Diffstat (limited to 'include/ruby/backward.h')
0 files changed, 0 insertions, 0 deletions
