From: shevegen@...
Date: 2017-12-25T23:47:02+00:00
Subject: [ruby-core:84450] [Ruby trunk Bug#14233] syntax error caused by paren-less method call with kwargs and block

Issue #14233 has been updated by shevegen (Robert A. Heiler).


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?

----------------------------------------
Bug #14233: syntax error caused by paren-less method call with kwargs and block
https://bugs.ruby-lang.org/issues/14233#change-68946

* Author: cremno (cremno phobia)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Example:

~~~ ruby
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}
                    ^
~~~



-- 
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>