Fixed container format for CSV
authorDavid Vorgrimmler <vorgrimmlerdavid@gmx.de>
Fri, 29 Jun 2012 12:26:17 +0000 (14:26 +0200)
committerDavid Vorgrimmler <vorgrimmlerdavid@gmx.de>
Fri, 29 Jun 2012 12:26:17 +0000 (14:26 +0200)
lib/serializer.rb

index 3a7ce1d..03ca285 100644 (file)
@@ -505,7 +505,7 @@ module OpenTox
         }
 
         # serialize to csv
-        @rows += dataset.compounds.collect do |compound|
+        dataset.compounds.each do |compound|
           entries=dataset.data_entries[compound]
           if entries
             inchi = URI.encode_www_form_component(Compound.new(compound).to_inchi)
@@ -530,7 +530,7 @@ module OpenTox
                 row.collect! { |x| x ? x : 0 } 
               }
             end
-            row_container
+            row_container.each { |row| @rows << row }
 
           end
         end