Blank fields exist legitimately

The first process in Windows is usually [System Process] which has no
associated path, arch, or user, causing this code to skip all those
columns. Check for nil instead of blank to get around it. Need to
revisit this and make nonsense columns nil instead of an empty-string.
This commit is contained in:
James Lee 2012-05-16 17:47:31 -06:00
parent 5bd374e6e9
commit de22d76a40
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ class ProcessList < Array
# ppid. Cut columns from the list if they aren't there. It is conceivable # ppid. Cut columns from the list if they aren't there. It is conceivable
# that processes might have different columns, but for now assume that the # that processes might have different columns, but for now assume that the
# first one is representative. # first one is representative.
cols.delete_if { |c| !( first.has_key?(c.downcase) ) or first[c.downcase].blank? } cols.delete_if { |c| !( first.has_key?(c.downcase) ) or first[c.downcase].nil? }
opts = { opts = {
"Header" => "Process List", "Header" => "Process List",