diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-02-28 10:32:28 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-02-28 11:39:20 +0900 |
commit | ff3d7b720ec21e4856aac0b3c493bc78cbac83d4 (patch) | |
tree | 5954bdfc783adb6060337b0f7dbb1589984e6291 /lib/bundler/rubygems_ext.rb | |
parent | 02ead4a82eff7dd48153d6457929fe48f50e28df (diff) |
Merge RubyGems and Bundler master
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5606
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 |