Project

General

Profile

Actions

Bug #13691

closed

Word- and symbol array literals not valid where regular array is

Added by ted (Ted Johansson) almost 7 years ago. Updated almost 5 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
[ruby-core:81806]

Description

Not sure if this is a limitation of the design space in the parser, or just a missed edge case. (Note that a regular array literal works fine.)

Steps to reproduce:

Run ruby -c on:

hoge %i(a b) { piyo }

Expected behaviour:

Syntax OK

Actual behaviour:

syntax error, unexpected '{', expecting end-of-input

Related issues 3 (0 open3 closed)

Related to Ruby master - Bug #13547: [].delete 1 { 'NG' }ClosedActions
Related to Ruby master - Bug #14023: SyntaxError on array argument and blockRejectednobu (Nobuyoshi Nakada)Actions
Is duplicate of Ruby master - Bug #505: 1.upto 2 {|i| p i }Closedmatz (Yukihiro Matsumoto)08/27/2008Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0