Merge pull request #390 from taichi-ishitani/master
fixed FrozenError caused by frozen-string-literal
This commit is contained in:
commit
3219d8e5af
|
@ -26,8 +26,10 @@ matrix:
|
||||||
- rvm: jruby-head
|
- rvm: jruby-head
|
||||||
- rvm: jruby
|
- rvm: jruby
|
||||||
before_install:
|
before_install:
|
||||||
- gem update --system
|
- "if $(ruby -e 'exit(RUBY_VERSION >= \"2.3.0\")'); then gem update --system; fi"
|
||||||
- gem install bundler
|
- "if $(ruby -e 'exit(RUBY_VERSION < \"2.3.0\")'); then gem update --system 2.7.8; fi"
|
||||||
|
- "if $(ruby -e 'exit(RUBY_VERSION >= \"2.3.0\")'); then gem install bundler; fi"
|
||||||
|
- "if $(ruby -e 'exit(RUBY_VERSION < \"2.3.0\")'); then gem install bundler --version 1.17.3; fi"
|
||||||
- gem --version
|
- gem --version
|
||||||
before_script:
|
before_script:
|
||||||
- echo `whereis zip`
|
- echo `whereis zip`
|
||||||
|
|
|
@ -603,7 +603,7 @@ module Zip
|
||||||
get_input_stream do |is|
|
get_input_stream do |is|
|
||||||
set_extra_attributes_on_path(dest_path)
|
set_extra_attributes_on_path(dest_path)
|
||||||
|
|
||||||
buf = ''
|
buf = ''.dup
|
||||||
while (buf = is.sysread(::Zip::Decompressor::CHUNK_SIZE, buf))
|
while (buf = is.sysread(::Zip::Decompressor::CHUNK_SIZE, buf))
|
||||||
os << buf
|
os << buf
|
||||||
end
|
end
|
||||||
|
|
|
@ -26,7 +26,7 @@ module Zip
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_unknown_item
|
def create_unknown_item
|
||||||
s = ''
|
s = ''.dup
|
||||||
class << s
|
class << s
|
||||||
alias_method :to_c_dir_bin, :to_s
|
alias_method :to_c_dir_bin, :to_s
|
||||||
alias_method :to_local_bin, :to_s
|
alias_method :to_local_bin, :to_s
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Zip
|
||||||
def initialize(input_stream, decrypter = NullDecrypter.new)
|
def initialize(input_stream, decrypter = NullDecrypter.new)
|
||||||
super(input_stream)
|
super(input_stream)
|
||||||
@zlib_inflater = ::Zlib::Inflate.new(-Zlib::MAX_WBITS)
|
@zlib_inflater = ::Zlib::Inflate.new(-Zlib::MAX_WBITS)
|
||||||
@output_buffer = ''
|
@output_buffer = ''.dup
|
||||||
@has_returned_empty_string = false
|
@has_returned_empty_string = false
|
||||||
@decrypter = decrypter
|
@decrypter = decrypter
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue