Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add a workaround for #1411.

  • Loading branch information...
commit 52cc272f3066fa4c1aa02ef28f865d3706144880 1 parent d3d6212
@Watson1978 Watson1978 authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/timeout.rb
View
7 lib/timeout.rb
@@ -63,6 +63,13 @@ def timeout(sec, klass = nil) #:yield: +sec+
end
end
rescue exception => e
+ # FIXME: workaround for Ticket #1411
+ if e.backtrace.nil?
+ raise if klass
+ raise Error, e.message
+ end
+ ####################################
+
rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o
(bt = e.backtrace).reject! {|m| rej =~ m}
level = -caller(CALLER_OFFSET).size
Please sign in to comment.
Something went wrong with that request. Please try again.