lib/io_streams/streams.rb in iostreams-0.9.1 vs lib/io_streams/streams.rb in iostreams-0.10.0

- old
+ new

@@ -90,10 +90,10 @@ # # Example plain text / binary file: # RocketJob::Formatter::Formats.streams_for_file_name('myfile.csv') # => [ :file ] def streams_for_file_name(file_name) - raise ArgumentError.new("RocketJob Cannot detect file format when uploading to stream: #{file_name.inspect}") if file_name.respond_to?(:read) + raise ArgumentError.new("RocketJob Cannot detect file format when uploading to stream: #{file_name.inspect}") if reader_stream?(file_name) parts = file_name.split('.') extensions = [] while extension = parts.pop break unless @@extensions[extension.to_sym]