[ruby-core:123161] [Ruby Feature#17398] SyntaxError in endless method

2 Sep
2025
2 Sep
'25
4:13 a.m.
Issue #17398 has been updated by matz (Yukihiro Matsumoto). Sounds reasonable, considering existing grammar. Matz. ---------------------------------------- Feature #17398: SyntaxError in endless method https://bugs.ruby-lang.org/issues/17398#change-114499 * Author: zverok (Victor Shepelev) * Status: Open ---------------------------------------- This works: ```ruby def foo() = puts("bar") ``` This does not: ```ruby def foo() = puts "bar" # ^ syntax error, unexpected string literal, expecting `do' or '{' or '(' ``` Is this intentional or accidental? Not sure how it is reasoned. ---Files-------------------------------- allow-command-style-endless-method-def.patch (3.44 KB) -- https://bugs.ruby-lang.org/
1
Age (days ago)
1
Last active (days ago)
0 comments
1 participants
participants (1)
-
matz (Yukihiro Matsumoto)