lib/bundler/lazy_specification.rb in bundler-2.4.8 vs lib/bundler/lazy_specification.rb in bundler-2.4.9
- old
+ new
@@ -18,27 +18,27 @@
@source = source
@force_ruby_platform = default_force_ruby_platform
end
def full_name
- if platform == Gem::Platform::RUBY
+ @full_name ||= if platform == Gem::Platform::RUBY
"#{@name}-#{@version}"
else
"#{@name}-#{@version}-#{platform}"
end
end
def ==(other)
- identifier == other.identifier
+ full_name == other.full_name
end
def eql?(other)
- identifier.eql?(other.identifier)
+ full_name.eql?(other.full_name)
end
def hash
- identifier.hash
+ full_name.hash
end
##
# Does this locked specification satisfy +dependency+?
#
@@ -125,13 +125,9 @@
@__to_s ||= if platform == Gem::Platform::RUBY
"#{name} (#{version})"
else
"#{name} (#{version}-#{platform})"
end
- end
-
- def identifier
- @__identifier ||= [name, version, platform.to_s]
end
def git_version
return unless source.is_a?(Bundler::Source::Git)
" #{source.revision[0..6]}"