lib/quandl/format/dataset/load.rb in quandl_format-0.4.2 vs lib/quandl/format/dataset/load.rb in quandl_format-0.4.3
- old
+ new
@@ -80,9 +80,11 @@
node[:data_line] = node[:line] + 1
node[:section] = :data
# skip to the next line
return node
end
+ # strip extra commas
+ rline = rline.gsub(/,+$/,'') if node[:section] == :attributes
# append the line to the requested section
node[ node[:section] ] += ( node[:section] == :data ) ? "#{line}\n" : rline
# return the updated node
node
end
\ No newline at end of file