1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/csv] Use "\n" for the default row separator on Ruby 3.0 or later

1f9cbc170e
This commit is contained in:
Sutou Kouhei 2021-09-12 07:34:15 +09:00 committed by Sutou Kouhei
parent 7f3dd601c8
commit 8ba98f83b0
Notes: git 2021-10-24 05:58:04 +09:00
4 changed files with 40 additions and 7 deletions

View file

@ -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