Project

General

Profile

Actions

Bug #11380

closed

Parser regression in 2.3?

Added by matsuda (Akira Matsuda) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-07-21 trunk 51319) [x86_64-darwin14]
[ruby-core:70067]

Description

This code works with 2.2 but causes SyntaxError with 2.3.

def foo(pr, options, &blk)
  p pr.call
end

foo -> { :hello }, a: 1 do end

#=> t.rb:5: syntax error, unexpected keyword_do, expecting end-of-input


Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #11107: Syntax error is raised by "p ->() do a(1) do end end", but not by "p ->() do a 1 do end end"ClosedActions
Has duplicate Ruby master - Bug #11389: Regression in method parameter parsingClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0