diff options
| author | Geremia Taglialatela <[email protected]> | 2023-06-02 20:55:14 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-06-02 20:55:14 +0200 |
| commit | 4195130bb4633bc667aeedd297dc56d7632a5810 (patch) | |
| tree | 58a96dd864cc81c66c14499b6b6de40dbcd1d936 /lib/axlsx/util | |
| parent | ad87c51bf8c8f59a36514bb95dc6d3a582c6b2fd (diff) | |
| download | caxlsx-4195130bb4633bc667aeedd297dc56d7632a5810.tar.gz caxlsx-4195130bb4633bc667aeedd297dc56d7632a5810.zip | |
Fix negated if offenses
Should also provide a negligible performance improvement, about 3%
on Ruby 3.2 and 6% on Ruby 2.6 (M1 Pro)
Diffstat (limited to 'lib/axlsx/util')
| -rw-r--r-- | lib/axlsx/util/zip_command.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/util/zip_command.rb b/lib/axlsx/util/zip_command.rb index 44e06af5..77cc44c7 100644 --- a/lib/axlsx/util/zip_command.rb +++ b/lib/axlsx/util/zip_command.rb @@ -63,7 +63,7 @@ module Axlsx escaped_dir = Shellwords.shellescape(@dir) command = "cd #{escaped_dir} && #{@zip_command} #{output} #{inputs}" stdout_and_stderr, status = Open3.capture2e(command) - if !status.success? + unless status.success? raise ZipError, stdout_and_stderr end end |
