lib/eighty_legs/eighty_format.rb in 80legs-0.2.2 vs lib/eighty_legs/eighty_format.rb in 80legs-0.2.3
- old
+ new
@@ -1,10 +1,10 @@
module EightyLegs
class EightyFormat
def initialize(filename_or_io)
if filename_or_io.is_a?(String)
initialize_with_filename(filename_or_io)
- elsif filename_or_io.is_a?(IO)
+ elsif filename_or_io.respond_to?(:read)
initialize_with_io(filename_or_io)
else
raise TypeError.new(filename_or_io.class)
end
check_for_classid_and_version()