summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/specification_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/specification_command.rb')
-rw-r--r--lib/rubygems/commands/specification_command.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/commands/specification_command.rb b/lib/rubygems/commands/specification_command.rb
index d96c8b8627..3bc02a9c14 100644
--- a/lib/rubygems/commands/specification_command.rb
+++ b/lib/rubygems/commands/specification_command.rb
@@ -127,7 +127,7 @@ Specific fields in the specification can be extracted in YAML format:
end
unless options[:all] then
- specs = [specs.sort_by { |s| s.version }.last]
+ specs = [specs.max_by { |s| s.version }]
end
specs.each do |s|