Project

General

Profile

Bug #13976

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

Added by janosch-x (Janosch Müller) over 1 year ago. Updated over 1 year 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

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

History

#1

Updated by shyouhei (Shyouhei Urabe) over 1 year ago

  • Is duplicate of Bug #13898: Block parsing regression added
#2

Updated by shyouhei (Shyouhei Urabe) over 1 year ago

  • Is duplicate of Bug #13939: Ruby 2.4.2 has issue supporting Seattle.rb style for define_method added

Updated by janosch-x (Janosch Müller) over 1 year ago

sorry, duplicate of https://bugs.ruby-lang.org/issues/13939
feel free to delete this ticket.

#4

Updated by matz (Yukihiro Matsumoto) over 1 year ago

  • Status changed from Open to Closed
#5

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Has duplicate Bug #14233: syntax error caused by paren-less method call with kwargs and block added

Also available in: Atom PDF