removed specs.map.with_index from gem-list command and replaced with each_with_index.map to meet 1.8 compatibility
This commit is contained in:
parent
652dbf4ad4
commit
cf2b6d4e80
|
@ -33,12 +33,12 @@ class Pry
|
|||
end
|
||||
|
||||
gems.each do |gem, specs|
|
||||
specs.sort! do |a,b|
|
||||
Gem::Version.new(b.version) <=> Gem::Version.new(a.version)
|
||||
specs.sort! do |a,b|
|
||||
Gem::Version.new(b.version) <=> Gem::Version.new(a.version)
|
||||
end
|
||||
|
||||
versions = specs.map.with_index do |spec, index|
|
||||
index == 0 ? text.bright_green(spec.version.to_s) : text.green(spec.version.to_s)
|
||||
|
||||
versions = specs.each_with_index.map do |spec, index|
|
||||
index == 0 ? text.bright_green(spec.version.to_s) : text.green(spec.version.to_s)
|
||||
end
|
||||
|
||||
output.puts "#{text.white gem} (#{versions.join ', '})"
|
||||
|
|
Loading…
Reference in New Issue