summaryrefslogtreecommitdiff
path: root/lib/bundler/vendored_timeout.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/vendored_timeout.rb')
-rw-r--r--lib/bundler/vendored_timeout.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/bundler/vendored_timeout.rb b/lib/bundler/vendored_timeout.rb
new file mode 100644
index 0000000000..9b2507c0cc
--- /dev/null
+++ b/lib/bundler/vendored_timeout.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+begin
+ require "rubygems/vendored_timeout"
+rescue LoadError
+ begin
+ require "rubygems/timeout"
+ rescue LoadError
+ require "timeout"
+ Gem::Timeout = Timeout
+ end
+end