summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-05-23 01:37:22 +0200
committerGeremia Taglialatela <[email protected]>2023-05-23 01:37:22 +0200
commit1eb9c45c20f2b459ffdb562507e2b6793196dec9 (patch)
tree3d12113360c690c61ea8373e6be1cc62bc8964e1 /lib
parent6752225bbb8a9eec905ec02a98f1a25a309c404a (diff)
downloadcaxlsx-1eb9c45c20f2b459ffdb562507e2b6793196dec9.tar.gz
caxlsx-1eb9c45c20f2b459ffdb562507e2b6793196dec9.zip
Fix Performance/RedundantBlockCall offense
Ref: https://github.com/fastruby/fast-ruby#proccall-and-block-arguments-vs-yieldcode
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx/util/zip_command.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/util/zip_command.rb b/lib/axlsx/util/zip_command.rb
index bc098a92..44e06af5 100644
--- a/lib/axlsx/util/zip_command.rb
+++ b/lib/axlsx/util/zip_command.rb
@@ -25,10 +25,10 @@ module Axlsx
# Create a temporary directory for writing files to.
#
# The directory and its contents are removed at the end of the block.
- def open(output, &block)
+ def open(output)
Dir.mktmpdir do |dir|
@dir = dir
- block.call(self)
+ yield(self)
write_file
zip_parts(output)
end