Actions
Bug #17190
closedNot working multiple assignment by rightward assignment statement
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.0preview1 (2020-09-25 master 0096d2b895) [x86_64-darwin19]
Description
For example. It is foo.rb
42, 42 => a, b
p a
p b
I expected it.
42
42
But, Real result.
hoge.rb:1: syntax error, unexpected ',', expecting end-of-input
42, 42 => a, b
Is this intentional?
Updated by shyouhei (Shyouhei Urabe) about 4 years ago
You need parens.
[42, 42] => a, b
Updated by jeremyevans0 (Jeremy Evans) about 4 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0