Make 'gem-cd' use the most recent gem, not the oldest gem.
This commit is contained in:
parent
e271e17afa
commit
397d89f01a
|
@ -23,7 +23,7 @@ class Pry
|
|||
Gem.source_index.find_name(name)
|
||||
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"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue