From ccf2443901c18ffb26b2785f52d921005e862167 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 8 Feb 2024 12:16:31 +0000 Subject: [PATCH 4/4] treewide: future-proof frozen_string_literal changes Once again Ruby seems ready to introduce more incompatibilities and force busywork upon maintainers[1]. In order to avoid incompatibilities in the future, I used a Perl script[2] to prepend `frozen_string_literal: false' to every Ruby file. Somebody interested will have to go through every Ruby source file and enable frozen_string_literal once they've thoroughly verified it's safe to do so. [1] https://bugs.ruby-lang.org/issues/20205 [2] https://yhbt.net/add-fsl.git/74d7689/s/?b=add-fsl.perl --- Rakefile | 1 + bin/unicorn | 1 + bin/unicorn_rails | 1 + examples/big_app_gc.rb | 1 + examples/echo.ru | 1 + examples/logger_mp_safe.rb | 1 + examples/unicorn.conf.minimal.rb | 1 + examples/unicorn.conf.rb | 1 + ext/unicorn_http/extconf.rb | 1 + lib/unicorn.rb | 1 + lib/unicorn/app/old_rails.rb | 1 + lib/unicorn/app/old_rails/static.rb | 1 + lib/unicorn/cgi_wrapper.rb | 1 + lib/unicorn/configurator.rb | 1 + lib/unicorn/const.rb | 1 + lib/unicorn/http_request.rb | 1 + lib/unicorn/http_response.rb | 1 + lib/unicorn/http_server.rb | 1 + lib/unicorn/launcher.rb | 1 + lib/unicorn/oob_gc.rb | 1 + lib/unicorn/preread_input.rb | 1 + lib/unicorn/select_waiter.rb | 1 + lib/unicorn/socket_helper.rb | 1 + lib/unicorn/stream_input.rb | 1 + lib/unicorn/tee_input.rb | 1 + lib/unicorn/tmpio.rb | 1 + lib/unicorn/util.rb | 1 + lib/unicorn/worker.rb | 1 + setup.rb | 1 + t/broken-app.ru | 1 + t/client_body_buffer_size.ru | 1 + t/detach.ru | 1 + t/env.ru | 1 + t/fails-rack-lint.ru | 1 + t/heartbeat-timeout.ru | 1 + t/integration.ru | 1 + t/listener_names.ru | 1 + t/oob_gc.ru | 1 + t/oob_gc_path.ru | 1 + t/pid.ru | 1 + t/preread_input.ru | 1 + t/reopen-logs.ru | 1 + t/t0013.ru | 1 + t/t0014.ru | 1 + t/t0301.ru | 1 + test/aggregate.rb | 1 + test/benchmark/dd.ru | 1 + test/benchmark/ddstream.ru | 1 + test/benchmark/readinput.ru | 1 + test/benchmark/stack.ru | 1 + test/exec/test_exec.rb | 1 + test/test_helper.rb | 1 + test/unit/test_ccc.rb | 1 + test/unit/test_configurator.rb | 1 + test/unit/test_droplet.rb | 1 + test/unit/test_http_parser.rb | 1 + test/unit/test_http_parser_ng.rb | 1 + test/unit/test_request.rb | 1 + test/unit/test_server.rb | 1 + test/unit/test_signals.rb | 1 + test/unit/test_socket_helper.rb | 1 + test/unit/test_stream_input.rb | 1 + test/unit/test_tee_input.rb | 1 + test/unit/test_util.rb | 1 + test/unit/test_waiter.rb | 1 + unicorn.gemspec | 1 + 66 files changed, 66 insertions(+) diff --git a/Rakefile b/Rakefile index 37569ce..fe1588b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: false # optional rake-compiler support in case somebody needs to cross compile begin mk = "ext/unicorn_http/Makefile" diff --git a/bin/unicorn b/bin/unicorn index 00c8464..af8353c 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -1,5 +1,6 @@ #!/this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby # -*- encoding: binary -*- +# frozen_string_literal: false require 'unicorn/launcher' require 'optparse' diff --git a/bin/unicorn_rails b/bin/unicorn_rails index 354c1df..374fd8e 100755 --- a/bin/unicorn_rails +++ b/bin/unicorn_rails @@ -1,5 +1,6 @@ #!/this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby # -*- encoding: binary -*- +# frozen_string_literal: false require 'unicorn/launcher' require 'optparse' require 'fileutils' diff --git a/examples/big_app_gc.rb b/examples/big_app_gc.rb index c1bae10..0baea26 100644 --- a/examples/big_app_gc.rb +++ b/examples/big_app_gc.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: false # see {Unicorn::OobGC}[https://yhbt.net/unicorn/Unicorn/OobGC.html] # Unicorn::OobGC was broken in Unicorn v3.3.1 - v3.6.1 and fixed in v3.6.2 diff --git a/examples/echo.ru b/examples/echo.ru index e982180..453a5e6 100644 --- a/examples/echo.ru +++ b/examples/echo.ru @@ -1,4 +1,5 @@ #\-E none +# frozen_string_literal: false # # Example application that echoes read data back to the HTTP client. # This emulates the old echo protocol people used to run. diff --git a/examples/logger_mp_safe.rb b/examples/logger_mp_safe.rb index 05ad3fa..f2c0500 100644 --- a/examples/logger_mp_safe.rb +++ b/examples/logger_mp_safe.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Multi-Processing-safe monkey patch for Logger # # This monkey patch fixes the case where "preload_app true" is used and diff --git a/examples/unicorn.conf.minimal.rb b/examples/unicorn.conf.minimal.rb index 46fd634..4f96ede 100644 --- a/examples/unicorn.conf.minimal.rb +++ b/examples/unicorn.conf.minimal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Minimal sample configuration file for Unicorn (not Rack) when used # with daemonization (unicorn -D) started in your working directory. # diff --git a/examples/unicorn.conf.rb b/examples/unicorn.conf.rb index d90bdc4..5bae830 100644 --- a/examples/unicorn.conf.rb +++ b/examples/unicorn.conf.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Sample verbose configuration file for Unicorn (not Rack) # # This configuration file documents many features of Unicorn diff --git a/ext/unicorn_http/extconf.rb b/ext/unicorn_http/extconf.rb index 11099cd..de896fe 100644 --- a/ext/unicorn_http/extconf.rb +++ b/ext/unicorn_http/extconf.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require 'mkmf' have_func("rb_hash_clear", "ruby.h") or abort 'Ruby 2.0+ required' diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 564cb30..fb91679 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require 'etc' require 'stringio' require 'raindrops' diff --git a/lib/unicorn/app/old_rails.rb b/lib/unicorn/app/old_rails.rb index 1e8c41a..54b3e69 100644 --- a/lib/unicorn/app/old_rails.rb +++ b/lib/unicorn/app/old_rails.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # :enddoc: # This code is based on the original Rails handler in Mongrel diff --git a/lib/unicorn/app/old_rails/static.rb b/lib/unicorn/app/old_rails/static.rb index 2257270..cf34e02 100644 --- a/lib/unicorn/app/old_rails/static.rb +++ b/lib/unicorn/app/old_rails/static.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # :enddoc: # This code is based on the original Rails handler in Mongrel # Copyright (c) 2005 Zed A. Shaw diff --git a/lib/unicorn/cgi_wrapper.rb b/lib/unicorn/cgi_wrapper.rb index d9b7fe5..fb43605 100644 --- a/lib/unicorn/cgi_wrapper.rb +++ b/lib/unicorn/cgi_wrapper.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # :enddoc: # This code is based on the original CGIWrapper from Mongrel diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index b21a01d..3c81596 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require 'logger' # Implements a simple DSL for configuring a unicorn server. diff --git a/lib/unicorn/const.rb b/lib/unicorn/const.rb index 33ab4ac..8032863 100644 --- a/lib/unicorn/const.rb +++ b/lib/unicorn/const.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false module Unicorn::Const # :nodoc: # default TCP listen host address (0.0.0.0, all interfaces) diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index ab3bd6e..a48dab7 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # :enddoc: # no stable API here require 'unicorn_http' diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb index 0ed0ae3..3634165 100644 --- a/lib/unicorn/http_response.rb +++ b/lib/unicorn/http_response.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # :enddoc: # Writes a Rack response to your client using the HTTP/1.1 specification. # You use it by simply doing: diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index ed5bbf1..08fbe40 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # This is the process manager of Unicorn. This manages worker # processes which in turn handle the I/O and application process. diff --git a/lib/unicorn/launcher.rb b/lib/unicorn/launcher.rb index 78e8f39..bd3324e 100644 --- a/lib/unicorn/launcher.rb +++ b/lib/unicorn/launcher.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # :enddoc: $stdout.sync = $stderr.sync = true diff --git a/lib/unicorn/oob_gc.rb b/lib/unicorn/oob_gc.rb index db9f2cb..efd9177 100644 --- a/lib/unicorn/oob_gc.rb +++ b/lib/unicorn/oob_gc.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # Strongly consider https://github.com/tmm1/gctools if using Ruby 2.1+ # It is built on new APIs in Ruby 2.1, so it is more intelligent than diff --git a/lib/unicorn/preread_input.rb b/lib/unicorn/preread_input.rb index 12eb3e8..c62cc09 100644 --- a/lib/unicorn/preread_input.rb +++ b/lib/unicorn/preread_input.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false module Unicorn # This middleware is used to ensure input is buffered to memory diff --git a/lib/unicorn/select_waiter.rb b/lib/unicorn/select_waiter.rb index cb84aab..d11ea57 100644 --- a/lib/unicorn/select_waiter.rb +++ b/lib/unicorn/select_waiter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # fallback for non-Linux and Linux <4.5 systems w/o EPOLLEXCLUSIVE class Unicorn::SelectWaiter # :nodoc: def get_readers(ready, readers, timeout) # :nodoc: diff --git a/lib/unicorn/socket_helper.rb b/lib/unicorn/socket_helper.rb index 06ec2b2..986932f 100644 --- a/lib/unicorn/socket_helper.rb +++ b/lib/unicorn/socket_helper.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # :enddoc: require 'socket' diff --git a/lib/unicorn/stream_input.rb b/lib/unicorn/stream_input.rb index 9246f73..23a9976 100644 --- a/lib/unicorn/stream_input.rb +++ b/lib/unicorn/stream_input.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # When processing uploads, unicorn may expose a StreamInput object under # "rack.input" of the Rack environment when diff --git a/lib/unicorn/tee_input.rb b/lib/unicorn/tee_input.rb index 2ccc2d9..b3c6535 100644 --- a/lib/unicorn/tee_input.rb +++ b/lib/unicorn/tee_input.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # Acts like tee(1) on an input input to provide a input-like stream # while providing rewindable semantics through a File/StringIO backing diff --git a/lib/unicorn/tmpio.rb b/lib/unicorn/tmpio.rb index 0bbf6ec..deecd80 100644 --- a/lib/unicorn/tmpio.rb +++ b/lib/unicorn/tmpio.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # :stopdoc: require 'tmpdir' diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb index b826de4..f28d929 100644 --- a/lib/unicorn/util.rb +++ b/lib/unicorn/util.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require 'fcntl' module Unicorn::Util # :nodoc: diff --git a/lib/unicorn/worker.rb b/lib/unicorn/worker.rb index 4af31be..d2445d5 100644 --- a/lib/unicorn/worker.rb +++ b/lib/unicorn/worker.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require "raindrops" # This class and its members can be considered a stable interface diff --git a/setup.rb b/setup.rb index cf1abd9..96cf75a 100644 --- a/setup.rb +++ b/setup.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # # setup.rb # diff --git a/t/broken-app.ru b/t/broken-app.ru index d05d7ab..5966bff 100644 --- a/t/broken-app.ru +++ b/t/broken-app.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false # we do not want Rack::Lint or anything to protect us use Rack::ContentLength use Rack::ContentType, "text/plain" diff --git a/t/client_body_buffer_size.ru b/t/client_body_buffer_size.ru index 44161a5..1a0fb16 100644 --- a/t/client_body_buffer_size.ru +++ b/t/client_body_buffer_size.ru @@ -1,4 +1,5 @@ #\ -E none +# frozen_string_literal: false app = lambda do |env| input = env['rack.input'] case env["PATH_INFO"] diff --git a/t/detach.ru b/t/detach.ru index bbd998e..8d35951 100644 --- a/t/detach.ru +++ b/t/detach.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false use Rack::ContentType, "text/plain" fifo_path = ENV["TEST_FIFO"] or abort "TEST_FIFO not set" run lambda { |env| diff --git a/t/env.ru b/t/env.ru index 388412e..86c3cfa 100644 --- a/t/env.ru +++ b/t/env.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false use Rack::ContentLength use Rack::ContentType, "text/plain" run lambda { |env| [ 200, {}, [ env.inspect << "\n" ] ] } diff --git a/t/fails-rack-lint.ru b/t/fails-rack-lint.ru index 82bfb5f..8b8b5ec 100644 --- a/t/fails-rack-lint.ru +++ b/t/fails-rack-lint.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false # This rack app returns an invalid status code, which will cause # Rack::Lint to throw an exception if it is present. This # is used to check whether Rack::Lint is in the stack or not. diff --git a/t/heartbeat-timeout.ru b/t/heartbeat-timeout.ru index 3eeb5d6..ccc6a8e 100644 --- a/t/heartbeat-timeout.ru +++ b/t/heartbeat-timeout.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false use Rack::ContentLength headers = { 'content-type' => 'text/plain' } run lambda { |env| diff --git a/t/integration.ru b/t/integration.ru index 888833a..6df481c 100644 --- a/t/integration.ru +++ b/t/integration.ru @@ -1,4 +1,5 @@ #!ruby +# frozen_string_literal: false # Copyright (C) unicorn hackers # License: GPL-3.0+ diff --git a/t/listener_names.ru b/t/listener_names.ru index edb4e6a..f52c59b 100644 --- a/t/listener_names.ru +++ b/t/listener_names.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false use Rack::ContentLength use Rack::ContentType, "text/plain" names = Unicorn.listener_names.inspect # rely on preload_app=true diff --git a/t/oob_gc.ru b/t/oob_gc.ru index 224cb06..2ae58a8 100644 --- a/t/oob_gc.ru +++ b/t/oob_gc.ru @@ -1,4 +1,5 @@ #\-E none +# frozen_string_literal: false require 'unicorn/oob_gc' use Rack::ContentLength use Rack::ContentType, "text/plain" diff --git a/t/oob_gc_path.ru b/t/oob_gc_path.ru index 7f40601..5358222 100644 --- a/t/oob_gc_path.ru +++ b/t/oob_gc_path.ru @@ -1,4 +1,5 @@ #\-E none +# frozen_string_literal: false require 'unicorn/oob_gc' use Rack::ContentLength use Rack::ContentType, "text/plain" diff --git a/t/pid.ru b/t/pid.ru index f5fd31f..b49b137 100644 --- a/t/pid.ru +++ b/t/pid.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false use Rack::ContentLength use Rack::ContentType, "text/plain" run lambda { |env| [ 200, {}, [ "#$$\n" ] ] } diff --git a/t/preread_input.ru b/t/preread_input.ru index 18af221..5f68fe9 100644 --- a/t/preread_input.ru +++ b/t/preread_input.ru @@ -1,4 +1,5 @@ #\-E none +# frozen_string_literal: false require 'digest/md5' require 'unicorn/preread_input' use Unicorn::PrereadInput diff --git a/t/reopen-logs.ru b/t/reopen-logs.ru index c39e8f6..488da85 100644 --- a/t/reopen-logs.ru +++ b/t/reopen-logs.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false use Rack::ContentLength use Rack::ContentType, "text/plain" run lambda { |env| diff --git a/t/t0013.ru b/t/t0013.ru index 48a3a34..e425093 100644 --- a/t/t0013.ru +++ b/t/t0013.ru @@ -1,4 +1,5 @@ #\ -E none +# frozen_string_literal: false use Rack::ContentLength use Rack::ContentType, 'text/plain' app = lambda do |env| diff --git a/t/t0014.ru b/t/t0014.ru index b0bd2b7..686d214 100644 --- a/t/t0014.ru +++ b/t/t0014.ru @@ -1,4 +1,5 @@ #\ -E none +# frozen_string_literal: false use Rack::ContentLength use Rack::ContentType, 'text/plain' app = lambda do |env| diff --git a/t/t0301.ru b/t/t0301.ru index ce68213..54929b1 100644 --- a/t/t0301.ru +++ b/t/t0301.ru @@ -1,4 +1,5 @@ #\-N --debug +# frozen_string_literal: false run(lambda do |env| case env['PATH_INFO'] when '/vars' diff --git a/test/aggregate.rb b/test/aggregate.rb index 5eebbe5..0f32b2f 100755 --- a/test/aggregate.rb +++ b/test/aggregate.rb @@ -1,5 +1,6 @@ #!/usr/bin/ruby -n # -*- encoding: binary -*- +# frozen_string_literal: false BEGIN { $tests = $assertions = $failures = $errors = 0 } diff --git a/test/benchmark/dd.ru b/test/benchmark/dd.ru index 111fa2e..5bd2739 100644 --- a/test/benchmark/dd.ru +++ b/test/benchmark/dd.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false # This benchmark is the simplest test of the I/O facilities in # unicorn. It is meant to return a fixed-sized blob to test # the performance of things in Unicorn, _NOT_ the app. diff --git a/test/benchmark/ddstream.ru b/test/benchmark/ddstream.ru index b14c973..fd40ced 100644 --- a/test/benchmark/ddstream.ru +++ b/test/benchmark/ddstream.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false # This app is intended to test large HTTP responses with or without # a fully-buffering reverse proxy such as nginx. Without a fully-buffering # reverse proxy, unicorn will be unresponsive when client count exceeds diff --git a/test/benchmark/readinput.ru b/test/benchmark/readinput.ru index c91bec3..95c0226 100644 --- a/test/benchmark/readinput.ru +++ b/test/benchmark/readinput.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false # This app is intended to test large HTTP requests with or without # a fully-buffering reverse proxy such as nginx. Without a fully-buffering # reverse proxy, unicorn will be unresponsive when client count exceeds diff --git a/test/benchmark/stack.ru b/test/benchmark/stack.ru index fc9193f..17a565b 100644 --- a/test/benchmark/stack.ru +++ b/test/benchmark/stack.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: false run(lambda { |env| body = "#{caller.size}\n" h = { diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 8494452..807f724 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # Don't add to this file, new tests are in Perl 5. See t/README FLOCK_PATH = File.expand_path(__FILE__) require './test/test_helper' diff --git a/test/test_helper.rb b/test/test_helper.rb index d86f83b..0bf3c90 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # Copyright (c) 2005 Zed A. Shaw # You can redistribute it and/or modify it under the same terms as Ruby 1.8 or diff --git a/test/unit/test_ccc.rb b/test/unit/test_ccc.rb index f518230..a0a2bff 100644 --- a/test/unit/test_ccc.rb +++ b/test/unit/test_ccc.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'socket' require 'unicorn' require 'io/wait' diff --git a/test/unit/test_configurator.rb b/test/unit/test_configurator.rb index 1298f0e..1a89aca 100644 --- a/test/unit/test_configurator.rb +++ b/test/unit/test_configurator.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require 'test/unit' require 'tempfile' diff --git a/test/unit/test_droplet.rb b/test/unit/test_droplet.rb index 81ad82b..4b2d2d0 100644 --- a/test/unit/test_droplet.rb +++ b/test/unit/test_droplet.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'test/unit' require 'unicorn' diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb index 697af44..adcc84f 100644 --- a/test/unit/test_http_parser.rb +++ b/test/unit/test_http_parser.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # Copyright (c) 2005 Zed A. Shaw # You can redistribute it and/or modify it under the same terms as Ruby 1.8 or diff --git a/test/unit/test_http_parser_ng.rb b/test/unit/test_http_parser_ng.rb index 425d5ad..fd47246 100644 --- a/test/unit/test_http_parser_ng.rb +++ b/test/unit/test_http_parser_ng.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require './test/test_helper' require 'digest/md5' diff --git a/test/unit/test_request.rb b/test/unit/test_request.rb index 53ae944..9d1b350 100644 --- a/test/unit/test_request.rb +++ b/test/unit/test_request.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # Copyright (c) 2009 Eric Wong # You can redistribute it and/or modify it under the same terms as Ruby 1.8 or diff --git a/test/unit/test_server.rb b/test/unit/test_server.rb index 7ffa48f..5a2252f 100644 --- a/test/unit/test_server.rb +++ b/test/unit/test_server.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # Copyright (c) 2005 Zed A. Shaw # You can redistribute it and/or modify it under the same terms as Ruby 1.8 or diff --git a/test/unit/test_signals.rb b/test/unit/test_signals.rb index 6c48754..49ff3c7 100644 --- a/test/unit/test_signals.rb +++ b/test/unit/test_signals.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false # Copyright (c) 2009 Eric Wong # You can redistribute it and/or modify it under the same terms as Ruby 1.8 or diff --git a/test/unit/test_socket_helper.rb b/test/unit/test_socket_helper.rb index a446f06..4363474 100644 --- a/test/unit/test_socket_helper.rb +++ b/test/unit/test_socket_helper.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require './test/test_helper' require 'tempfile' diff --git a/test/unit/test_stream_input.rb b/test/unit/test_stream_input.rb index 7986ca7..7ee98e4 100644 --- a/test/unit/test_stream_input.rb +++ b/test/unit/test_stream_input.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require 'test/unit' require 'digest/sha1' diff --git a/test/unit/test_tee_input.rb b/test/unit/test_tee_input.rb index 607ce87..8f05c77 100644 --- a/test/unit/test_tee_input.rb +++ b/test/unit/test_tee_input.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require 'test/unit' require 'digest/sha1' diff --git a/test/unit/test_util.rb b/test/unit/test_util.rb index bc7b233..ce53b86 100644 --- a/test/unit/test_util.rb +++ b/test/unit/test_util.rb @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false require './test/test_helper' require 'tempfile' diff --git a/test/unit/test_waiter.rb b/test/unit/test_waiter.rb index 0995de2..a20994b 100644 --- a/test/unit/test_waiter.rb +++ b/test/unit/test_waiter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'test/unit' require 'unicorn' require 'unicorn/select_waiter' diff --git a/unicorn.gemspec b/unicorn.gemspec index e7e3ef7..36700a8 100644 --- a/unicorn.gemspec +++ b/unicorn.gemspec @@ -1,4 +1,5 @@ # -*- encoding: binary -*- +# frozen_string_literal: false manifest = File.exist?('.manifest') ? IO.readlines('.manifest').map!(&:chomp!) : `git ls-files`.split("\n")