lib/ro_crate/reader.rb in ro-crate-0.4.8 vs lib/ro_crate/reader.rb in ro-crate-0.4.9
- old
+ new
@@ -29,10 +29,10 @@
# @param source [String, ::File, Pathname, #read] The location of the zip file, or an IO-like object.
# @param target [String, ::File, Pathname] The target directory where the file should be unzipped.
def self.unzip_to(source, target)
source = Pathname.new(::File.expand_path(source)) if source.is_a?(String)
- if source.is_a?(Pathname) || source.is_a?(::File)
+ if source.is_a?(Pathname) || source.respond_to?(:path)
unzip_file_to(source, target)
else
unzip_io_to(source, target)
end
end