Merge pull request #390 from taichi-ishitani/master

fixed FrozenError caused by frozen-string-literal
This commit is contained in:
John Lees-Miller 2019-03-21 21:58:17 +02:00 committed by GitHub
commit 3219d8e5af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View File

@ -26,8 +26,10 @@ matrix:
- rvm: jruby-head
- rvm: jruby
before_install:
- gem update --system
- gem install bundler
- "if $(ruby -e 'exit(RUBY_VERSION >= \"2.3.0\")'); then gem update --system; fi"
- "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
before_script:
- echo `whereis zip`

View File

@ -603,7 +603,7 @@ module Zip
get_input_stream do |is|
set_extra_attributes_on_path(dest_path)
buf = ''
buf = ''.dup
while (buf = is.sysread(::Zip::Decompressor::CHUNK_SIZE, buf))
os << buf
end

View File

@ -26,7 +26,7 @@ module Zip
end
def create_unknown_item
s = ''
s = ''.dup
class << s
alias_method :to_c_dir_bin, :to_s
alias_method :to_local_bin, :to_s

View File

@ -3,7 +3,7 @@ module Zip
def initialize(input_stream, decrypter = NullDecrypter.new)
super(input_stream)
@zlib_inflater = ::Zlib::Inflate.new(-Zlib::MAX_WBITS)
@output_buffer = ''
@output_buffer = ''.dup
@has_returned_empty_string = false
@decrypter = decrypter
end