Project

General

Profile

Actions

Bug #14233

closed

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

Added by cremno (cremno phobia) over 6 years ago. Updated over 6 years ago.

Status:
Rejected
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 1 (0 open1 closed)

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

Updated by shevegen (Robert A. Heiler) over 6 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?

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

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

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Status changed from Open to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0