mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 20:44:20 +00:00
The same also applies to `break`/`next`. https://bugs.ruby-lang.org/issues/21540 https://github.com/ruby/prism/commit/3a38b192e3
20 lines
585 B
Plaintext
20 lines
585 B
Plaintext
foo && return bar
|
|
^~~ unexpected local variable or method, expecting end-of-input
|
|
|
|
tap { foo && break bar }
|
|
^~~ unexpected local variable or method, expecting end-of-input
|
|
|
|
tap { foo && next bar }
|
|
^~~ unexpected local variable or method, expecting end-of-input
|
|
|
|
foo && return()
|
|
^ unexpected '(', expecting end-of-input
|
|
|
|
foo && return(bar)
|
|
^ unexpected '(', expecting end-of-input
|
|
|
|
foo && return(bar, baz)
|
|
^~~~~~~~~~ unexpected write target
|
|
^ unexpected '(', expecting end-of-input
|
|
|