diff options
author | Sutou Kouhei <[email protected]> | 2023-06-26 14:29:26 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-06-28 16:37:10 +0900 |
commit | d6d60d4287f58200cc3725d19cb503be70e7d724 () | |
tree | 910c78dabb8fb1446907916db83c9ef1d89edc44 /lib/csv | |
parent | 539559d36e1355befd39c6964f3efd9dd3af4846 (diff) |
[ruby/csv] Fix a bug that the same line is used multiple times
: fix https://.com/ruby/csv/pull/279 It's happen when: * `keep_start`/`keep_{drop,back}` are nested. (e.g.: `strip: true, skip_lines: /.../`) * Row separator is `\r\n`. * `InputScanner` is used. (Small input doesn't use `InputScanner`) Reported by Gabriel Nagy. Thanks!!! https://.com/ruby/csv/commit/183635ab56
-rw-r--r-- | lib/csv/parser.rb | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -201,7 +201,8 @@ class CSV # trace(__method__, :rescan, start, buffer) string = @scanner.string if scanner == @scanner - keep = string.byteslice(start, string.bytesize - start) else keep = string end |