Project

General

Profile

This project is closed and read-only.

Actions

Bug #2692

closed

Ruby hangs after returning from rescue clause inside the block

Bug #2692: Ruby hangs after returning from rescue clause inside the block

Added by Uriel (Ilya Lopatkin) over 16 years ago. Updated over 15 years ago.

Status:
Closed
ruby -v:
ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
[ruby-core:27969]

Description

=begin
Here is the sample code:
def foo
some_block = -> do
0.upto(1000) do |i|
begin
raise Exception.new if i % 500 == 0
rescue Exception
return
end
end
end

some_block.call
end

foo

VM hangs after return statement and can't be even interrupted via Ctrl+C.
I've tried the latest snapshot and it behaves the same.
=end


Related issues 1 (0 open1 closed)

Is duplicate of Backport191 - Bug #1584: return from lambda within 2 procs freezesClosedActions
Actions

Also available in: PDF Atom