summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-12-19 17:07:48 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-19 18:50:45 +0100
commitd02da0d81b4c75517e41a0baa8742ffed9d77288 (patch)
tree98e36c7a90c5dc5a78560733efbbce94bce868b2 /lib
parent14af0e7417fe1fef3c521b69e0875d3ed5fed971 (diff)
downloadbundler-d02da0d81b4c75517e41a0baa8742ffed9d77288.tar.gz
Merge #7505
7505: Make sure to `require "rubygems"` explicitly r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was some setups have `--disable=gem` in `RUBYOPT`, and sometimes use `bundler` without modifying that env. ### What was your diagnosis of the problem? My diagnosis was that we shouldn't break those setups just to save a `require`. ### What is your fix for the problem, implemented in this PR? My fix is to add a `require "rubygems"` on top of the file that needs it. Fixes #7487. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit eada59b3d37d6f2f1a05b2d8052a499dfb8fd222)
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/rubygems_integration.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 88fcd4d9e0..18da5915a5 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require "rubygems"
+
module Bundler
class RubygemsIntegration
if defined?(Gem::Ext::Builder::CHDIR_MONITOR)