diff options
Diffstat (limited to 'lib/bundler/rubygems_ext.rb')
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 5d572aa73d..cc06b9ee93 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -4,14 +4,12 @@ require "pathname" require "rubygems/specification" -# Possible use in Gem::Specification#source below and require -# shouldn't be deferred. -require "rubygems/source" - require_relative "match_platform" module Gem class Specification + include ::Bundler::MatchPlatform + attr_accessor :remote, :location, :relative_loaded_from remove_method :source @@ -81,6 +79,17 @@ module Gem gemfile end + # Backfill missing YAML require when not defined. Fixed since 3.1.0.pre1. + module YamlBackfiller + def to_yaml(opts = {}) + Gem.load_yaml unless defined?(::YAML) + + super(opts) + end + end + + prepend YamlBackfiller + def nondevelopment_dependencies dependencies - development_dependencies end @@ -228,9 +237,3 @@ module Gem end end end - -module Gem - class Specification - include ::Bundler::MatchPlatform - end -end |