summaryrefslogtreecommitdiff
path: root/lib/csv
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2020-11-23 05:54:04 +0900
committerSutou Kouhei <kou@cozmixng.org>2020-11-24 09:33:55 +0900
commit832b7f3c547377621e920704c3e4dd839d21f0af (patch)
tree64021c3e574e08ccfa6de91b867655dbb8541a33 /lib/csv
parentf9935205acc6ee1c737c2c132e547747c21d3ead (diff)
[ruby/csv] Add support for \r\n with skip_lines: /...$/ again
GitHub: fix GH-194 Reported by Josef Šimánek. Thanks!!! https://github.com/ruby/csv/commit/fd86afe081
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3804
Diffstat (limited to 'lib/csv')
-rw-r--r--lib/csv/parser.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/csv/parser.rb b/lib/csv/parser.rb
index 68fe238194..2fb3b0a46e 100644
--- a/lib/csv/parser.rb
+++ b/lib/csv/parser.rb
@@ -785,6 +785,7 @@ class CSV
end
def skip_line?(line)
+ line = line.delete_suffix(@row_separator)
case @skip_lines
when String
line.include?(@skip_lines)