Fixed conditional in Zip::File.open_buffer()

It required it to be be both an IO _and_ a String, which isn't exactly possible.
This commit is contained in:
Nick Markwell 2013-09-06 12:06:19 -04:00
parent 652916025a
commit 9f6bc1e2e9
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ module Zip
# (This can be used to extract data from a
# downloaded zip archive without first saving it to disk.)
def open_buffer(io)
unless io.is_a?(IO) && io.is_a?(String)
unless io.is_a?(IO) || io.is_a?(String)
raise "Zip::ZipFile.open_buffer expects an argument of class String or IO. Found: #{io.class}"
end
zf = ::Zip::File.new('', true, true)