Add the `options` parameter to `Zip::File.open`.
This commit is contained in:
parent
34d2074ecb
commit
f58e38012c
|
@ -107,8 +107,8 @@ module Zip
|
||||||
# Same as #new. If a block is passed the ZipFile object is passed
|
# Same as #new. If a block is passed the ZipFile object is passed
|
||||||
# to the block and is automatically closed afterwards just as with
|
# to the block and is automatically closed afterwards just as with
|
||||||
# ruby's builtin File.open method.
|
# ruby's builtin File.open method.
|
||||||
def open(file_name, create = false)
|
def open(file_name, create = false, options = {})
|
||||||
zf = ::Zip::File.new(file_name, create)
|
zf = ::Zip::File.new(file_name, create, false, options)
|
||||||
return zf unless block_given?
|
return zf unless block_given?
|
||||||
begin
|
begin
|
||||||
yield zf
|
yield zf
|
||||||
|
|
Loading…
Reference in New Issue