{ext,test}/zlib: Specify frozen_string_literal: true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2017-02-07 12:49:57 +00:00
parent 7511130721
commit 026ded9384
2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
# frozen_string_literal: false
# frozen_string_literal: true
#
# extconf.rb
#

View File

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