summaryrefslogtreecommitdiff
path: root/lib/optparse
diff options
context:
space:
mode:
authorStan Lo <stan.lo@shopify.com>2025-07-17 12:29:40 +0100
committergit <svn-admin@ruby-lang.org>2025-07-17 16:06:34 +0000
commit13de248f391ce41a83b86c61fc05202886296b57 (patch)
treeb6eb50821cd3f6c4e0c1f8df4f407c702efea667 /lib/optparse
parenta46309d19a321b110bbb5a7887b8bf94eb1ae63f (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 'lib/optparse')
0 files changed, 0 insertions, 0 deletions