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) about 7 years ago. Updated about 7 years ago.

Status:
Closed
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 #1

Updated by shyouhei (Shyouhei Urabe) about 7 years ago

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

Updated by shyouhei (Shyouhei Urabe) about 7 years 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) about 7 years ago

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

Actions #4

Updated by matz (Yukihiro Matsumoto) about 7 years ago

  • Status changed from Open to Closed
Actions #5

Updated by nobu (Nobuyoshi Nakada) almost 7 years ago

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0