fix a nil.gsub() bug
git-svn-id: file:///home/svn/framework3/trunk@13943 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
5c9ddb293d
commit
8295bb0a4e
|
@ -121,7 +121,11 @@ class Table
|
|||
rows.each { |row|
|
||||
next if is_hr(row)
|
||||
str << ( row.map{|x|
|
||||
x.gsub(/[\r\n]/, ' ').gsub(/\s+/, ' ').gsub('"', '""')
|
||||
if x.nil?
|
||||
""
|
||||
else
|
||||
x.gsub(/[\r\n]/, ' ').gsub(/\s+/, ' ').gsub('"', '""')
|
||||
end
|
||||
}.map{|x| "\"#{x}\"" }.join(",") + "\n" )
|
||||
}
|
||||
str
|
||||
|
|
Loading…
Reference in New Issue