summaryrefslogtreecommitdiff
path: root/lib/bundler/dependency.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-12-22 08:20:23 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-12-24 16:57:07 +0900
commitf6620037ba1477d2c337d7b511f094d6d0fbb69c (patch)
tree4d8d38eaf97e6ca88162dd574e7871e1739f22ae /lib/bundler/dependency.rb
parentd5635dfe36588b04d3dd6065ab4e422f51629b11 (diff)
Merge RubyGems-3.4.0 and Bundler-2.4.0
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6987
Diffstat (limited to 'lib/bundler/dependency.rb')
-rw-r--r--lib/bundler/dependency.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb
index 695e5c12b2..1f8b9da2eb 100644
--- a/lib/bundler/dependency.rb
+++ b/lib/bundler/dependency.rb
@@ -7,7 +7,7 @@ require_relative "rubygems_ext"
module Bundler
class Dependency < Gem::Dependency
attr_reader :autorequire
- attr_reader :groups, :platforms, :gemfile, :path, :git, :github, :branch, :ref, :force_ruby_platform
+ attr_reader :groups, :platforms, :gemfile, :path, :git, :github, :branch, :ref
ALL_RUBY_VERSIONS = ((18..27).to_a + (30..31).to_a).freeze
PLATFORM_MAP = {
@@ -42,7 +42,7 @@ module Bundler
@env = options["env"]
@should_include = options.fetch("should_include", true)
@gemfile = options["gemfile"]
- @force_ruby_platform = options["force_ruby_platform"]
+ @force_ruby_platform = options["force_ruby_platform"] if options.key?("force_ruby_platform")
@autorequire = Array(options["require"] || []) if options.key?("require")
end
@@ -50,7 +50,7 @@ module Bundler
# Returns the platforms this dependency is valid for, in the same order as
# passed in the `valid_platforms` parameter
def gem_platforms(valid_platforms)
- return [Gem::Platform::RUBY] if @force_ruby_platform
+ return [Gem::Platform::RUBY] if force_ruby_platform
return valid_platforms if @platforms.empty?
valid_platforms.select {|p| expanded_platforms.include?(GemHelpers.generic(p)) }