diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-10-10 19:43:02 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-10-10 19:43:02 -0500 |
commit | a1202ef6572958f6ad10dfa5ae75c3da0fefe6b1 (patch) | |
tree | cc75b4cd3cf6f011f725cbe6cc80152360755d1a | |
parent | d94616dd8b028a37920cfe6c24414d664602e8c5 (diff) | |
download | bundler-seg-rubygems-psych-warning.tar.gz |
Avoid RubyGems psych warning breaking the testsseg-rubygems-psych-warning
-rw-r--r-- | lib/bundler/deprecate.rb | 4 | ||||
-rw-r--r-- | lib/bundler/psyched_yaml.rb | 9 |
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 |