Browse files

minor fix, using size instead of count

  • Loading branch information...
1 parent 2587b01 commit b41d853309f45ae7979de1313b710291d95222d1 Wilco van Duinkerken committed Nov 21, 2010
Showing with 8 additions and 2 deletions.
  1. +6 −0 History.txt
  2. +2 −2 lib/csv_importer/csv_importer.rb
View
6 History.txt
@@ -4,4 +4,10 @@
* Initial release
=== 0.0.3 2010-11-20
+
* 1 major enhancement, got gem working properly...finally.
+
+=== 0.0.3 2010-11-20
+
+* 1 minor enhancement:
+ * Changed .count call on array to .size for compatibility reasons
View
4 lib/csv_importer/csv_importer.rb
@@ -1,5 +1,5 @@
module CSVImporter
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
require 'csv'
@@ -61,7 +61,7 @@ def determine_delimiter_and_columns(str_or_readable)
#TODO: Fix repitition in determine_delimiter_and_columns
comma = first_line.split(",")
semicolon = first_line.split(";")
- if comma.count > semicolon.count
+ if comma.size > semicolon.size
return ",",comma.map!{|c| c.strip.downcase}
else
return ";",semicolon.map!{|c| c.strip.downcase}

0 comments on commit b41d853

Please sign in to comment.