summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2017-10-16 03:57:30 +0000
committerSamuel Giddins <segiddins@segiddins.me>2017-10-30 13:50:25 -0500
commitf9599c7e8c6775bb4044ad2b4809a957ef8fadea (patch)
treecc75b4cd3cf6f011f725cbe6cc80152360755d1a
parentd94616dd8b028a37920cfe6c24414d664602e8c5 (diff)
downloadbundler-f9599c7e8c6775bb4044ad2b4809a957ef8fadea.tar.gz
Auto merge of #6088 - bundler:seg-rubygems-psych-warning, r=olleolleolle
Avoid RubyGems psych warning breaking the tests This, along with https://github.com/rubygems/rubygems/pull/2034, should get tests passing again 🙌 (cherry picked from commit ac7e1f7d10bd887cfe8e137d07f28e9fed1ee8fc)
-rw-r--r--lib/bundler/deprecate.rb4
-rw-r--r--lib/bundler/psyched_yaml.rb9
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/bundler/deprecate.rb b/lib/bundler/deprecate.rb
index b3a9823925..23b80b8726 100644
--- a/lib/bundler/deprecate.rb
+++ b/lib/bundler/deprecate.rb
@@ -1,7 +1,9 @@
# frozen_string_literal: true
module Bundler
- if defined? ::Deprecate
+ if defined? Bundler::Deprecate
+ # nothing to do!
+ elsif defined? ::Deprecate
Deprecate = ::Deprecate
elsif defined? Gem::Deprecate
Deprecate = Gem::Deprecate
diff --git a/lib/bundler/psyched_yaml.rb b/lib/bundler/psyched_yaml.rb
index aeb2b30310..e654416a5a 100644
--- a/lib/bundler/psyched_yaml.rb
+++ b/lib/bundler/psyched_yaml.rb
@@ -26,3 +26,12 @@ module Bundler
YamlLibrarySyntaxError = ::ArgumentError
end
end
+
+require "bundler/deprecate"
+begin
+ Bundler::Deprecate.skip_during do
+ require "rubygems/safe_yaml"
+ end
+rescue LoadError
+ # it's OK if the file isn't there
+end