Use sort_by in PrettyListing
This commit is contained in:
parent
a6c514024b
commit
6a1ad36fbd
@ -85,7 +85,7 @@ end
|
||||
|
||||
class PrettyListing
|
||||
def initialize path
|
||||
Pathname.new(path).children.sort{ |a,b| a.to_s.downcase <=> b.to_s.downcase }.each do |pn|
|
||||
Pathname.new(path).children.sort_by { |p| p.to_s.downcase }.each do |pn|
|
||||
case pn.basename.to_s
|
||||
when 'bin', 'sbin'
|
||||
pn.find { |pnn| puts pnn unless pnn.directory? }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user