Project

General

Profile

Actions

Bug #14341

closed

do/end blocks after arrow operator don't work with ensure/rescue/else

Added by takiuchi (Genki Takiuchi) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:84754]

Description

New feature #12906 seems lacks a bit of implementation.

Example:

-> do
rescue
end
# => syntax error, unexpected keyword_rescue

lambda do
rescue
end
# => it's ok!

This behavior looks inconsistent.
I think all do/end blocks should work with ensure/rescue/else.

Actions

Also available in: Atom PDF

Like0
Like0