Bug #2692: Ruby hangs after returning from rescue clause inside the block
http://redmine.ruby-lang.org/issues/show/2692

Author: Ilya Lopatkin
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]

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.


----------------------------------------
http://redmine.ruby-lang.org