Issue #13976 has been updated by janosch-x (Janosch Mller).


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

----------------------------------------
Bug #13976: SyntaxError if curly brace block follows args without parentheses, introduced in 2.4.2
https://bugs.ruby-lang.org/issues/13976#change-67066

* Author: janosch-x (Janosch Mller)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
```ruby
# 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:

```ruby
let :foo { bar }
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>