Project

General

Profile

Actions

Bug #2729

closed

`unexpected break' occurs when a proc is called in ensure

Added by nobu (Nobuyoshi Nakada) about 14 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
ruby -v:
-
Backport:
[ruby-core:28132]

Description

=begin
Reproducing code:

class Bug
include Enumerable
def each
begin
yield :foo
ensure
proc {}.call
end
end
end
e = Bug.new
p e.detect{true} # => :foo
p e.any?{true} # => true
p e.all?{false} # => false
p e.include?(:foo) # => true

All work expectedly if no Proc#call, but all occurs `unexpected break' with it.
=end


Files

proc_in_ensure.patch (449 Bytes) proc_in_ensure.patch wanabe (_ wanabe), 02/21/2010 07:21 PM
rewrite-dfp-in-errinfo.txt (858 Bytes) rewrite-dfp-in-errinfo.txt ktsj (Kazuki Tsujimoto), 07/31/2011 10:58 AM

Related issues 1 (0 open1 closed)

Precedes Backport191 - Backport #2728: ruby segfaults returning from dynamically defined method in ensure blockClosedko1 (Koichi Sasada)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0