8000 Add `options` parameter to `Zip::File.open`. by hainesr · Pull Request #418 · rubyzip/rubyzip · GitHub
[go: up one dir, main page]

Skip to content

Add options parameter to Zip::File.open. #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add the options parameter to Zip::File.open.
  • Loading branch information
hainesr committed Oct 19, 2019
commit f58e38012cf4d7493f70ffdc4e9a583d94f72ad5
4 changes: 2 additions & 2 deletions lib/zip/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ 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)
def open(file_name, create = false, options = {})
zf = ::Zip::File.new(file_name, create, false, options)
return zf unless block_given?
begin
yield zf
Expand Down
0