diff options
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r-- | lib/bundler/lazy_specification.rb | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index 59689c609c..04ba2a2364 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -4,22 +4,6 @@ require_relative "match_platform" module Bundler class LazySpecification - Identifier = Struct.new(:name, :version, :platform) - class Identifier - include Comparable - def <=>(other) - return unless other.is_a?(Identifier) - [name, version, platform_string] <=> [other.name, other.version, other.platform_string] - end - - protected - - def platform_string - platform_string = platform.to_s - platform_string == Index::RUBY ? Index::NULL : platform_string - end - end - include MatchPlatform attr_reader :name, :version, :dependencies, :platform @@ -108,7 +92,7 @@ module Bundler end def identifier - @__identifier ||= Identifier.new(name, version, platform) + @__identifier ||= [name, version, platform_string] end def git_version @@ -116,6 +100,13 @@ module Bundler " #{source.revision[0..6]}" end + protected + + def platform_string + platform_string = platform.to_s + platform_string == Index::RUBY ? Index::NULL : platform_string + end + private def to_ary |