Skip to content

Commit 23da1fc

Browse files
Earlopainioquatix
authored andcommitted
Add frozen_string_literal: false to all files
There is a ridiculous amount of warnings from Ruby 3.4 chilled strings, and also a few errors because of StringIO incompatibility, see ruby/stringio#93 I'm not comfortable setting this to anything else than false. This at least fully keeps the current behaviour
1 parent bfd1452 commit 23da1fc

19 files changed

+19
-0
lines changed

lib/unicorn.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23
require 'etc'
34
require 'stringio'
45
require 'raindrops'

lib/unicorn/app/old_rails.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
# :enddoc:
45
# This code is based on the original Rails handler in Mongrel

lib/unicorn/app/old_rails/static.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23
# :enddoc:
34
# This code is based on the original Rails handler in Mongrel
45
# Copyright (c) 2005 Zed A. Shaw

lib/unicorn/cgi_wrapper.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
# :enddoc:
45
# This code is based on the original CGIWrapper from Mongrel

lib/unicorn/configurator.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23
require 'logger'
34

45
# Implements a simple DSL for configuring a unicorn server.

lib/unicorn/const.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
module Unicorn::Const # :nodoc:
45
# default TCP listen host address (0.0.0.0, all interfaces)

lib/unicorn/http_request.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23
# :enddoc:
34
# no stable API here
45
require 'unicorn_http'

lib/unicorn/http_response.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23
# :enddoc:
34
# Writes a Rack response to your client using the HTTP/1.1 specification.
45
# You use it by simply doing:

lib/unicorn/http_server.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
# This is the process manager of Unicorn. This manages worker
45
# processes which in turn handle the I/O and application process.

lib/unicorn/launcher.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
# :enddoc:
45
$stdout.sync = $stderr.sync = true

lib/unicorn/oob_gc.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
# Strongly consider https://github.com/tmm1/gctools if using Ruby 2.1+
45
# It is built on new APIs in Ruby 2.1, so it is more intelligent than

lib/unicorn/preread_input.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
module Unicorn
45
# This middleware is used to ensure input is buffered to memory

lib/unicorn/select_waiter.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
# fallback for non-Linux and Linux <4.5 systems w/o EPOLLEXCLUSIVE
23
class Unicorn::SelectWaiter # :nodoc:
34
def get_readers(ready, readers, timeout) # :nodoc:

lib/unicorn/socket_helper.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23
# :enddoc:
34
require 'socket'
45

lib/unicorn/stream_input.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
# When processing uploads, unicorn may expose a StreamInput object under
45
# "rack.input" of the Rack environment when

lib/unicorn/tee_input.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
# Acts like tee(1) on an input input to provide a input-like stream
45
# while providing rewindable semantics through a File/StringIO backing

lib/unicorn/tmpio.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23
# :stopdoc:
34
require 'tmpdir'
45

lib/unicorn/util.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23

34
require 'fcntl'
45
module Unicorn::Util # :nodoc:

lib/unicorn/worker.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- encoding: binary -*-
2+
# frozen_string_literal: false
23
require "raindrops"
34

45
# This class and its members can be considered a stable interface

0 commit comments

Comments
 (0)