summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/zlib/extconf.rb2
-rw-r--r--test/zlib/test_zlib.rb18
2 files changed, 10 insertions, 10 deletions
diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb
index c59ef7f..5f78172 100644
--- a/ext/zlib/extconf.rb
+++ b/ext/zlib/extconf.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#
# extconf.rb
#
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index 68acc72..38cb393 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -1,5 +1,5 @@
# coding: us-ascii
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'test/unit'
require 'stringio'
require 'tempfile'
@@ -42,7 +42,7 @@ if defined? Zlib
end
def test_deflate_chunked
- original = ''
+ original = ''.dup
chunks = []
r = Random.new 0
@@ -315,7 +315,7 @@ if defined? Zlib
z = Zlib::Inflate.new
- inflated = ""
+ inflated = "".dup
deflated.each_char do |byte|
inflated << z.inflate(byte)
@@ -603,7 +603,7 @@ if defined? Zlib
assert_equal(t.path, f.path)
end
- s = ""
+ s = "".dup
sio = StringIO.new(s)
gz = Zlib::GzipWriter.new(sio)
gz.print("foo")
@@ -625,7 +625,7 @@ if defined? Zlib
end
def test_ungetc
- s = ""
+ s = "".dup
w = Zlib::GzipWriter.new(StringIO.new(s))
w << (1...1000).to_a.inspect
w.close
@@ -640,7 +640,7 @@ if defined? Zlib
end
def test_ungetc_paragraph
- s = ""
+ s = "".dup
w = Zlib::GzipWriter.new(StringIO.new(s))
w << "abc"
w.close
@@ -778,7 +778,7 @@ if defined? Zlib
end
Zlib::GzipReader.open(t.path) do |f|
- s = ""
+ s = "".dup
f.readpartial(3, s)
assert("foo".start_with?(s))
@@ -938,7 +938,7 @@ if defined? Zlib
end
def test_corrupted_header
- gz = Zlib::GzipWriter.new(StringIO.new(s = ""))
+ gz = Zlib::GzipWriter.new(StringIO.new(s = "".dup))
gz.orig_name = "X"
gz.comment = "Y"
gz.print("foo")
@@ -1120,7 +1120,7 @@ if defined? Zlib
def test_deflate_stream
r = Random.new 0
- deflated = ''
+ deflated = ''.dup
Zlib.deflate(r.bytes(20000)) do |chunk|
deflated << chunk