diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-02-01 16:17:16 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-03-08 13:47:35 +0900 |
commit | 53468cc11147b0d285fc376fc546b677dad600ca (patch) | |
tree | eb9c97f544d089be2d324126b025b11f41a22c90 /lib/bundler/rubygems_ext.rb | |
parent | 2ab6b7a7516e1b2c48a66ce513afabb62d101461 (diff) |
Sync latest development version of bundler & rubygems
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4143
Diffstat (limited to 'lib/bundler/rubygems_ext.rb')
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 0322b06d07..2bd2dcb451 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -158,6 +158,22 @@ module Gem end end + if Gem::Requirement.new("~> 2.0").hash == Gem::Requirement.new("~> 2.0.0").hash + class Requirement + module CorrectHashForLambdaOperator + def hash + if requirements.any? {|r| r.first == "~>" } + requirements.map {|r| r.first == "~>" ? [r[0], r[1].to_s] : r }.sort.hash + else + super + end + end + end + + prepend CorrectHashForLambdaOperator + end + end + class Platform JAVA = Gem::Platform.new("java") unless defined?(JAVA) MSWIN = Gem::Platform.new("mswin32") unless defined?(MSWIN) |