summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-02-21 13:02:56 +1100
committerSamuel Giddins <segiddins@segiddins.me>2017-04-04 13:44:54 -0500
commitfc80e7498afbbea14485f3aeef0297a6c86b815a (patch)
tree4e8316028ebe954ba5dde117cfadaae7d22b79fa
parentf7b670b10a7f7909c6ae06afe176828e0708e5e4 (diff)
downloadbundler-fc80e7498afbbea14485f3aeef0297a6c86b815a.tar.gz
Avoid requiring the whole of rubygems/ext to backport monitor
-rw-r--r--lib/bundler/rubygems_integration.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 90768aac1d..2cb8badeba 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -746,7 +746,13 @@ module Bundler
end
def backport_ext_builder_monitor
- require "rubygems/ext"
+ # So we can avoid requiring "rubygems/ext" in its entirety
+ Gem.module_eval <<-RB, __FILE__, __LINE__ + 1
+ module Ext
+ end
+ RB
+
+ require "rubygems/ext/builder"
Gem::Ext::Builder.class_eval do
unless const_defined?(:CHDIR_MONITOR)