Project

General

Profile

Actions

Feature #21822

open

Expose Return Value in the ensure Block

Feature #21822: Expose Return Value in the ensure Block

Added by artemb (Artem Borodkin) 2 days ago. Updated about 3 hours ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

I'd like to propose a simple feature that allows easy access to the return value inside an ensure block.

begin 
   # ...
ensure => ret
   # ret is nil if an exception is raised
   LOGGER.debug "return value: #{ret}"
end
Actions

Also available in: PDF Atom