Project

General

Profile

Actions

Bug #9335

closed

dynamic rescue regression in Ruby 2.1

Added by fdr (Daniel Farina) almost 11 years ago. Updated almost 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
[ruby-core:59445]

Description

The following type of rescue block appears broken:

begin
raise 'hello'
rescue ->(e) { true }
end

In Ruby 1.9.3p484, this exits with a normal exit code and no output.

On Ruby 2.1.0, it instead yields:

/tmp/badin21.rb:4:in rescue in <main>': class or module required for rescue clause (TypeError) from /tmp/badin21.rb:2:in '

Some research suggests this is a regression to the pre-1.9.2 behavior, and there doesn't seem to be any direct mention about this change in the changelog of 2.1 nor 2.0.


Files

badin21.rb (64 Bytes) badin21.rb test case fdr (Daniel Farina), 01/01/2014 11:21 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0