Project

General

Profile

Actions

Bug #14023

closed

SyntaxError on array argument and block

Added by k0kubun (Takashi Kokubun) about 7 years ago. Updated almost 7 years ago.

Status:
Rejected
Target version:
ruby -v:
ruby 2.5.0preview1 (2017-10-10 trunk 60153) [x86_64-darwin16]
[ruby-core:83334]

Description

$ 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.


Related issues 4 (0 open4 closed)

Related to Ruby master - Bug #13547: [].delete 1 { 'NG' }ClosedActions
Related to Ruby master - Bug #13691: Word- and symbol array literals not valid where regular array isRejectedActions
Is duplicate of Ruby master - Bug #505: 1.upto 2 {|i| p i }Closedmatz (Yukihiro Matsumoto)08/27/2008Actions
Has duplicate Ruby master - Bug #14433: Error with Trailblazer Wrap using ruby 2.5.0Third Party's IssueActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0