Skip to content

Commit

Permalink
Merge pull request #390 from taichi-ishitani/master
Browse files Browse the repository at this point in the history
fixed FrozenError caused by frozen-string-literal
  • Loading branch information
jdleesmiller committed Mar 21, 2019
2 parents 6aecdf9 + 0e6e626 commit 3219d8e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion lib/zip/entry.rb
Expand Up @@ -603,7 +603,7 @@ def create_file(dest_path, _continue_on_exists_proc = proc { Zip.continue_on_exi
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
Expand Down
2 changes: 1 addition & 1 deletion lib/zip/extra_field.rb
Expand Up @@ -26,7 +26,7 @@ def extra_field_type_unknown(binstr, len, i)
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
Expand Down
2 changes: 1 addition & 1 deletion lib/zip/inflater.rb
Expand Up @@ -3,7 +3,7 @@ class Inflater < Decompressor #:nodoc:all
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
Expand Down

0 comments on commit 3219d8e

Please sign in to comment.