summaryrefslogtreecommitdiff
path: root/lib/rubygems/name_tuple.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/name_tuple.rb25
1 files changed, 18 insertions, 7 deletions
@@ -43,6 +43,20 @@ class Gem::NameTuple
end
##
# Indicate if this NameTuple matches the current platform.
def match_platform?
@@ -59,12 +73,7 @@ class Gem::NameTuple
# Return the name that the gemspec file would be
def spec_name
- case @platform
- when nil, 'ruby', ''
- "#{@name}-#{@version}.gemspec"
- else
- "#{@name}-#{@version}-#{@platform}.gemspec"
- end
end
##
@@ -74,10 +83,12 @@ class Gem::NameTuple
[@name, @version, @platform]
end
- def to_s
"#<Gem::NameTuple #{@name}, #{@version}, #{@platform}>"
end
def <=> other
to_a <=> other.to_a
end