1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Make 'gem-cd' use the most recent gem, not the oldest gem.

This commit is contained in:
epitron 2013-11-06 01:37:48 -05:00
parent e271e17afa
commit 397d89f01a

View file

@ -23,7 +23,7 @@ class Pry
Gem.source_index.find_name(name) Gem.source_index.find_name(name)
end end
first_spec = specs.sort_by{ |spec| Gem::Version.new(spec.version) }.first first_spec = specs.sort_by{ |spec| Gem::Version.new(spec.version) }.last
first_spec or raise CommandError, "Gem `#{name}` not found" first_spec or raise CommandError, "Gem `#{name}` not found"
end end