We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reproduction code:
require 'csv' puts CSV::VERSION csv = CSV.new(<<~CSV, headers: true, return_headers: true) head1,head2,head3 aaa,bbb,ccc ddd,ee"e.fff ggg,hhh,iii CSV until csv.eof? begin p csv.gets rescue CSV::MalformedCSVError => e p e end end
ruby 2.6.2:
$ ruby -v && ruby /tmp/csv.rb ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-linux] 3.0.4 #<CSV::Row "head1":"head1" "head2":"head2" "head3":"head3"> #<CSV::Row "head1":"aaa" "head2":"bbb" "head3":"ccc"> #<CSV::MalformedCSVError: Illegal quoting in line 3.> Traceback (most recent call last): 3: from /tmp/csv.rb:1:in `each' 2: from /home/krororo/.rbenv/versions/2.6.2/lib/ruby/2.6.0/csv/parser.rb:236:in `parse' 1: from /home/krororo/.rbenv/versions/2.6.2/lib/ruby/2.6.0/csv/parser.rb:236:in `new' /home/krororo/.rbenv/versions/2.6.2/lib/ruby/2.6.0/csv/row.rb:35:in `initialize': undefined method `size' for nil:NilClass (NoMethodError)
ruby 2.5.3:
$ ruby -v && ruby /tmp/csv.rb ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux] 2.4.8 #<CSV::Row "head1":"head1" "head2":"head2" "head3":"head3"> #<CSV::Row "head1":"aaa" "head2":"bbb" "head3":"ccc"> #<CSV::MalformedCSVError: Illegal quoting in line 3.> #<CSV::Row "head1":"ggg" "head2":"hhh" "head3":"iii">
The expected behavior is to get data after an error occurs.
The text was updated successfully, but these errors were encountered:
f31fb3b
Thanks for your report. I've fixed it.
BTW, the following backtrace is strange. It may be a CRuby bug. Could you report this to https://bugs.ruby-lang.org/projects/ruby-trunk/issues/new ?
3: from /tmp/csv.rb:1:in `each'
Sorry, something went wrong.
I opened https://bugs.ruby-lang.org/issues/15719
Thanks!
No branches or pull requests
reproduction code:
ruby 2.6.2:
ruby 2.5.3:
The expected behavior is to get data after an error occurs.
The text was updated successfully, but these errors were encountered: