Issue #14023 has been reported by k0kubun (Takashi Kokubun).

----------------------------------------
Bug #14023: SyntaxError on array argument and block
https://bugs.ruby-lang.org/issues/14023

* Author: k0kubun (Takashi Kokubun)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 2.5
* ruby -v: ruby 2.5.0preview1 (2017-10-10 trunk 60153) [x86_64-darwin16]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
~~~
$ RBENV_VERSION=2.4.2 ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]

$ RBENV_VERSION=2.4.2 ruby -c -e 'a [] {}'
Syntax OK

$ RBENV_VERSION=2.5.0-preview1 ruby -v
ruby 2.5.0preview1 (2017-10-10 trunk 60153) [x86_64-darwin16]

$ RBENV_VERSION=2.5.0-preview1 ruby -c -e 'a [] {}'
-e:1: syntax error, unexpected '{', expecting end-of-input
a [] {}
     ^
~~~

Is this intentional? This causes syntax error on https://github.com/plataformatec/devise/blob/v4.2.0/app/controllers/devise/sessions_controller.rb#L5.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>