diff --git a/lib/rex/ui/text/table.rb b/lib/rex/ui/text/table.rb index 8ba842a7e9..a593d080cb 100644 --- a/lib/rex/ui/text/table.rb +++ b/lib/rex/ui/text/table.rb @@ -121,11 +121,9 @@ class Table rows.each { |row| next if is_hr(row) str << ( row.map{|x| - if x.nil? - "" - else - x.gsub(/[\r\n]/, ' ').gsub(/\s+/, ' ').gsub('"', '""') - end + x = x.to_s + + x.gsub(/[\r\n]/, ' ').gsub(/\s+/, ' ').gsub('"', '""') }.map{|x| "\"#{x}\"" }.join(",") + "\n" ) } str