Project

General

Profile

Actions

Bug #20217

closed

void value not checked for begin/ensure/rescue

Added by kddnewton (Kevin Newton) 4 months ago. Updated 4 months ago.

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

Description

foo = begin
  return
ensure
end

I would expect this to raise a syntax error for a void value expression being assigned, but the ensure makes it so that this isn't checked.

Actions

Also available in: Atom PDF

Like0
Like0