Created
October 20, 2010 15:18
-
-
Save johnlauck/636615 to your computer and use it in GitHub Desktop.
Revisions
-
johnlauck revised this gist
Oct 20, 2010 . 1 changed file with 57 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,60 @@ >> require 'fastercsv' require 'fastercsv' => [] >> FasterCSV => FasterCSV >> FasterCSV.parse ArgumentError: wrong number of arguments (0 for 1) from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1226:in `initialize' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1226:in `new' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1226:in `parse' from (irb):22 >> FasterCSV.parse(s) FasterCSV::MalformedCSVError: Unclosed quoted field on line 1. from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1663:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `loop' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1526:in `each' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `to_a' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `read' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1229:in `parse' from (irb):23 >> s = '"abc"def","ghi","hij"' => "\"abc\"def\",\"ghi\",\"hij\"" >> FasterCSV.parse(s) FasterCSV::MalformedCSVError: Unclosed quoted field on line 1. from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1663:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `loop' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1526:in `each' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `to_a' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `read' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1229:in `parse' from (irb):25 >> s = '"abc\\"def","ghi","hij"' => "\"abc\\\"def\",\"ghi\",\"hij\"" >> FasterCSV.parse(s) FasterCSV::MalformedCSVError: Unclosed quoted field on line 1. from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1663:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `loop' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1526:in `each' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `to_a' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `read' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1229:in `parse' from (irb):27 >> s = '"abc"def","ghi","hij"' => "\"abc\"def\",\"ghi\",\"hij\"" >> FasterCSV.parse(s) FasterCSV::MalformedCSVError: Unclosed quoted field on line 1. from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1663:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `loop' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1526:in `each' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `to_a' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `read' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1229:in `parse' from (irb):29 >> s = '"abcdef","ghi","hij"' => "\"abcdef\",\"ghi\",\"hij\"" >> FasterCSV.parse(s) -
johnlauck created this gist
Oct 20, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ >> s = '"abcdef","ghi","hij"' => "\"abcdef\",\"ghi\",\"hij\"" >> FasterCSV.parse(s) => [["abcdef", "ghi", "hij"]] >> puts s "abcdef","ghi","hij" => nil >> s = '"abc\"def","ghi","hij"' => "\"abc\\\"def\",\"ghi\",\"hij\"" >> puts s "abc\"def","ghi","hij" => nil >> FasterCSV.parse(s) FasterCSV::MalformedCSVError: Unclosed quoted field on line 1. from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1663:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `loop' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `shift' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1526:in `each' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `to_a' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `read' from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1229:in `parse' from (irb):35 >> s = '"abc""def","ghi","hij"' => "\"abc\"\"def\",\"ghi\",\"hij\"" >> FasterCSV.parse(s) => [["abc\"def", "ghi", "hij"]] >> FasterCSV.parse(s).each {|c| puts c} abc"def ghi hij => [["abc\"def", "ghi", "hij"]] >> CSV.parse(s).each {|c| puts c} abc"def ghi hij => [["abc\"def", "ghi", "hij"]]