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-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`

View File

@ -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

View File

@ -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

View File

@ -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