lib/io_streams/file/reader.rb in iostreams-0.8.2 vs lib/io_streams/file/reader.rb in iostreams-0.9.0

- old
+ new

@@ -1,15 +1,15 @@ module IOStreams module File class Reader # Read from a file or stream def self.open(file_name_or_io, _=nil, &block) - unless file_name_or_io.respond_to?(:read) + unless IOStreams.reader_stream?(file_name_or_io) ::File.open(file_name_or_io, 'rb', &block) else block.call(file_name_or_io) end end end end -end \ No newline at end of file +end