Project

General

Profile

Bug #14233

syntax error caused by paren-less method call with kwargs and block

Added by cremno (cremno phobia) almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:84444]

Description

Example:

3.step by: 3, to: 9 {|i| p i}

Expected result (before 2.5.0):

3
6
9

Actual result (2.5.0):

a.rb:1: syntax error, unexpected '{', expecting end-of-input
3.step by: 3, to: 9 {|i| p i}
                    ^

Related issues

Is duplicate of Ruby master - Bug #13976: SyntaxError if curly brace block follows args without parentheses, introduced in 2.4.2ClosedActions

History

Updated by shevegen (Robert A. Heiler) almost 2 years ago

Does not work for me on 2.4.3:

syntax error, unexpected '{', expecting end-of-input
3.step by: 3, to: 9 {|i| p i}

Are you sure that this has worked before?

#2

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Is duplicate of Bug #13976: SyntaxError if curly brace block follows args without parentheses, introduced in 2.4.2 added
#3

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Status changed from Open to Rejected

Also available in: Atom PDF