File tree Expand file tree Collapse file tree 3 files changed +3
-10
lines changed
Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,6 @@ Layout/LineContinuationSpacing:
2121 Exclude :
2222 - ' lib/zip/bzip2/errors.rb'
2323
24- # Offense count: 3
25- # This cop supports unsafe autocorrection (--autocorrect-all).
26- Performance/UnfreezeString :
27- Exclude :
28- - ' lib/zip/bzip2/decompress.rb'
29- - ' lib/zip/bzip2/decompressor.rb'
30-
3124# Offense count: 9
3225# This cop supports safe autocorrection (--autocorrect).
3326Style/FileRead :
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def initialize(options = {})
1818 end
1919
2020 def decompress ( data )
21- result = '' . dup
21+ result = + ''
2222
2323 with_input_buffer ( data ) do |input_buffer |
2424 @libbz2 . input_buffer = input_buffer
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ class Decompressor < ::Zip::Decompressor #:nodoc:
88 def initialize ( *args )
99 super
1010
11- @buffer = '' . dup
11+ @buffer = + ''
1212 @bzip2_ffi_decompressor = ::Zip ::Bzip2 ::Decompress . new
1313 end
1414
15- def read ( length = nil , outbuf = '' . dup )
15+ def read ( length = nil , outbuf = + '' )
1616 return return_value_on_eof ( length ) if eof
1717
1818 fill_buffer ( length )
You can’t perform that action at this time.
0 commit comments