diff options
author | Sutou Kouhei <[email protected]> | 2021-09-12 07:34:15 +0900 |
---|---|---|
committer | Sutou Kouhei <[email protected]> | 2021-10-24 05:57:33 +0900 |
commit | 8ba98f83b0fa8634c68e2d86e71718cc8097bfcf (patch) | |
tree | 8093406ef146891d9254f179aeac3378b997f279 /lib/csv/parser.rb | |
parent | 7f3dd601c895354c041988251a0be05a8a423664 (diff) |
[ruby/csv] Use "\n" for the default row separator on Ruby 3.0 or later
https://github.com/ruby/csv/commit/1f9cbc170e
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5010
Diffstat (limited to 'lib/csv/parser.rb')
-rw-r--r-- | lib/csv/parser.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/csv/parser.rb b/lib/csv/parser.rb index d0b02a6423..0d8a157fd7 100644 --- a/lib/csv/parser.rb +++ b/lib/csv/parser.rb @@ -3,6 +3,7 @@ require "strscan" require_relative "delete_suffix" +require_relative "input_record_separator" require_relative "match_p" require_relative "row" require_relative "table" @@ -605,7 +606,7 @@ class CSV # do nothing: ensure will set default end end - separator = $INPUT_RECORD_SEPARATOR if separator == :auto + separator = InputRecordSeparator.value if separator == :auto end separator.to_s.encode(@encoding) end |