Sha256: 926a60da77aba8ebe854e13073147c0481836fb5b4b911ab91c93c8a2196b028

Contents?: true

Size: 744 Bytes

Versions: 2

Compression:

Stored size: 744 Bytes

Contents

require "English"
require "stringio"

class CSV
  module InputRecordSeparator
    class << self
      is_input_record_separator_deprecated = false
      verbose, $VERBOSE = $VERBOSE, true
      stderr, $stderr = $stderr, StringIO.new
      input_record_separator = $INPUT_RECORD_SEPARATOR
      begin
        $INPUT_RECORD_SEPARATOR = "\r\n"
        is_input_record_separator_deprecated = (not $stderr.string.empty?)
      ensure
        $INPUT_RECORD_SEPARATOR = input_record_separator
        $stderr = stderr
        $VERBOSE = verbose
      end

      if is_input_record_separator_deprecated
        def value
          "\n"
        end
      else
        def value
          $INPUT_RECORD_SEPARATOR
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
csv-3.2.2 lib/csv/input_record_separator.rb
csv-3.2.1 lib/csv/input_record_separator.rb