Issue #2343 has been updated by Hongli Lai.


Your code assumes that Timeout::Error is only caught outside the timeout block. My code fails because it catches the error inside the timeout block:

    require 'timeout'
    Timeout.timeout(1) do
      begin
        sleep
      rescue Timeout::Error
        puts "timed out!"
      end
    end

Is disallowing catching inside the block intentional?
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2343

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