summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2018-04-20 01:56:30 +0000
committerColby Swandale <me@colby.fyi>2018-04-20 12:25:55 +1000
commit205091db4f3a1bf7177aff3d9e788001180ab031 (patch)
treef5335d2be7ca3b4d692e7c45a1ee43c8f6506add
parent610ada6ecfd30846fbd87fd73dec6c989effdf07 (diff)
downloadbundler-205091db4f3a1bf7177aff3d9e788001180ab031.tar.gz
Auto merge of #6498 - bundler:colby/gem-util-compatability, r=colby-swandale
Fix calling undefined `Gem::Util.inflate` in RubyGemsIntegration for old RubyGems versions ### What was the end-user problem that led to this PR? RubyGems integration is calling `Gem::Util.inflate` which is not available in all supported versions of RubyGems. ### What was your diagnosis of the problem? See https://travis-ci.org/bundler/bundler/jobs/368919903 ### What is your fix for the problem, implemented in this PR? Check if `Gem::Util` is defined, and if not, fallback to using the old way calling `inflate` in RubyGems (cherry picked from commit 1eb812c8bdc4de6b052e2262b5d3d3d19f90d8a7)
-rw-r--r--lib/bundler/rubygems_integration.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 57abeda088..783d106e7b 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -132,7 +132,11 @@ module Bundler
end
def inflate(obj)
- Gem::Util.inflate(obj)
+ if defined?(Gem::Util)
+ Gem::Util.inflate(obj)
+ else
+ Gem.inflate(obj)
+ end
end
def sources=(val)