diff --git a/lib/zip/file.rb b/lib/zip/file.rb index 9c7f3cbd..7c051bcd 100644 --- a/lib/zip/file.rb +++ b/lib/zip/file.rb @@ -104,11 +104,11 @@ def initialize(path_or_io, create = false, buffer = false, options = {}) end class << self - # Same as #new. If a block is passed the ZipFile object is passed - # to the block and is automatically closed afterwards just as with - # ruby's builtin File.open method. - def open(file_name, create = false) - zf = ::Zip::File.new(file_name, create) + # Similar to ::new. If a block is passed the Zip::File object is passed + # to the block and is automatically closed afterwards, just as with + # ruby's builtin File::open method. + def open(file_name, create = false, options = {}) + zf = ::Zip::File.new(file_name, create, false, options) return zf unless block_given? begin yield zf