Project

General

Profile

Actions

Bug #20217

closed

void value not checked for begin/ensure/rescue

Added by kddnewton (Kevin Newton) 3 months ago. Updated 3 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 #1

Updated by nobu (Nobuyoshi Nakada) 3 months ago

  • Status changed from Open to Closed

Applied in changeset git|fed877c791f1c16a2b1a2c9a167b7f433505794d.


[Bug #20217] return with ensure is a void value expression

Actions

Also available in: Atom PDF

Like0
Like0