lib/bundler/lazy_specification.rb in bundler-2.3.20 vs lib/bundler/lazy_specification.rb in bundler-2.3.21

- old
+ new

@@ -1,9 +1,7 @@ # frozen_string_literal: true -require_relative "match_platform" - module Bundler class LazySpecification include MatchPlatform attr_reader :name, :version, :dependencies, :platform @@ -95,11 +93,11 @@ def __materialize__(candidates) @specification = begin search = candidates.reverse.find do |spec| spec.is_a?(StubSpecification) || - (spec.required_ruby_version.satisfied_by?(Gem.ruby_version) && - spec.required_rubygems_version.satisfied_by?(Gem.rubygems_version)) + (spec.matches_current_ruby? && + spec.matches_current_rubygems?) end if search.nil? && Bundler.frozen_bundle? search = candidates.last else search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))