diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-03-17 15:42:28 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-23 17:18:49 +0900 |
commit | a9fd1860dd30fff3b6e5ad0d65801f8188019325 (patch) | |
tree | d94415927a76a3f2dac64430fb3d8720bf63af28 /lib/bundler/remote_specification.rb | |
parent | 6ad6ae680a0f92cfa91c727701eb67150ffd4a27 (diff) |
Fix flaky when making materialized specs uniq
Sometimes we'll have an heterogenous array of specs which include
`Gem::Specification` objects, which don't define `#identifier`. Let's
use `#full_name` consistently.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7582
Diffstat (limited to 'lib/bundler/remote_specification.rb')
-rw-r--r-- | lib/bundler/remote_specification.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/bundler/remote_specification.rb b/lib/bundler/remote_specification.rb index 34d7fd116c..7b539b22ae 100644 --- a/lib/bundler/remote_specification.rb +++ b/lib/bundler/remote_specification.rb @@ -29,12 +29,8 @@ module Bundler @platform = _remote_specification.platform end - def identifier - @__identifier ||= [name, version, @platform.to_s] - end - def full_name - if @platform == Gem::Platform::RUBY + @full_name ||= if @platform == Gem::Platform::RUBY "#{@name}-#{@version}" else "#{@name}-#{@version}-#{@platform}" |