diff options
author | Andreas Maunz <andreas@maunz.de> | 2012-10-12 09:17:29 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2012-10-12 09:17:29 +0200 |
commit | e1ab4effde17972cfa69d351413e069d1ec3cd28 (patch) | |
tree | 364cbc11f10cdc77281aafa68d6b4bfcbbd54a8c | |
parent | 8aa9efbc50769495e543e52a6630761c41fbe4d4 (diff) |
Fixed fix
-rw-r--r-- | lib/parser.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/parser.rb b/lib/parser.rb index e86ebe1..fb67882 100644 --- a/lib/parser.rb +++ b/lib/parser.rb @@ -300,9 +300,11 @@ module OpenTox def detect_new_values(row, value_maps) row.shift row.each_index do |i| + value_maps[i] = Hash.new if value_maps[i].nil? + end + row.each_index do |i| value = row[i] unless (value.nil? or value == "") - value_maps[i] = Hash.new if value_maps[i].nil? value_maps[i][value].nil? ? value_maps[i][value]=0 : value_maps[i][value] += 1 end end |