lib/io_streams/encode/writer.rb in iostreams-1.1.0 vs lib/io_streams/encode/writer.rb in iostreams-1.1.1
- old
+ new
@@ -32,10 +32,10 @@
# Cleanse data read from the input stream.
# nil: No cleansing
# :printable Cleanse all non-printable characters except \r and \n
# Proc/lambda Proc to call after every read to cleanse the data
# Default: nil
- def initialize(output_stream, encoding: 'UTF-8', cleaner: nil, replace: nil)
+ def initialize(output_stream, encoding: "UTF-8", cleaner: nil, replace: nil)
super(output_stream)
@cleaner = ::IOStreams::Encode::Reader.send(:extract_cleaner, cleaner)
@encoding = encoding.nil? || encoding.is_a?(Encoding) ? encoding : Encoding.find(encoding)
@encoding_options = replace.nil? ? {} : {invalid: :replace, undef: :replace, replace: replace}