Project

General

Profile

Actions

Bug #13976

closed

SyntaxError if curly brace block follows args without parentheses, introduced in 2.4.2

Added by janosch-x (Janosch Müller) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
[ruby-core:83120]

Description

# ruby 2.4.1
p :bar do end # => :bar
p :bar {} # => :bar

# ruby 2.4.2
p :bar do end # => :bar
p :bar {} # => SyntaxError: syntax error, unexpected '{', expecting end-of-input

In the wild this will mainly affect rspec code:

let :foo { bar }

Related issues 3 (0 open3 closed)

Is duplicate of Ruby master - Bug #13898: Block parsing regressionRejectedActions
Is duplicate of Ruby master - Bug #13939: Ruby 2.4.2 has issue supporting Seattle.rb style for define_methodRejectednobu (Nobuyoshi Nakada)Actions
Has duplicate Ruby master - Bug #14233: syntax error caused by paren-less method call with kwargs and blockRejectedActions
Actions

Also available in: Atom PDF