Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed FrozenError caused by frozen-string-literal #390

Merged
merged 2 commits into from Mar 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -602,7 +602,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