Skip to content

Commit

Permalink
Merge pull request #1649 from puma/schneems/frozen
Browse files Browse the repository at this point in the history
Freeze all the strings!
  • Loading branch information
schneems committed Oct 17, 2018
2 parents 9de253d + 88e51fb commit 2668597
Show file tree
Hide file tree
Showing 29 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/puma/binder.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'uri'
require 'socket'

Expand Down
2 changes: 2 additions & 0 deletions lib/puma/cli.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'optparse'
require 'uri'

Expand Down
2 changes: 2 additions & 0 deletions lib/puma/client.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class IO
# We need to use this for a jruby work around on both 1.8 and 1.9.
# So this either creates the constant (on 1.8), or harmlessly
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/cluster.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/runner'
require 'puma/util'
require 'puma/plugin'
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/commonlogger.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Puma
# Rack::CommonLogger forwards every request to the given +app+, and
# logs a line in the
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/configuration.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/rack/builder'
require 'puma/plugin'
require 'puma/const'
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/const.rb
@@ -1,4 +1,6 @@
#encoding: utf-8
# frozen_string_literal: true

module Puma
class UnsupportedOption < RuntimeError
end
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/control_cli.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'optparse'
require_relative 'state_file'
require_relative 'const'
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/convenient.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/launcher'
require 'puma/configuration'

Expand Down
2 changes: 2 additions & 0 deletions lib/puma/daemon_ext.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Process

# This overrides the default version because it is broken if it
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/delegation.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Puma
module Delegation
def forward(what, who)
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/detect.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Puma
IS_JRUBY = defined?(JRUBY_VERSION)

Expand Down
2 changes: 2 additions & 0 deletions lib/puma/dsl.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Puma
# The methods that are available for use inside the config file.
# These same methods are used in Puma cli and the rack handler
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/events.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/const'
require "puma/null_io"
require 'stringio'
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/io_buffer.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/detect'

if Puma.jruby?
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/java_io_buffer.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'java'

# Conservative native JRuby/Java implementation of IOBuffer
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/jruby_restart.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'ffi'

module Puma
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/launcher.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/events'
require 'puma/detect'

Expand Down
2 changes: 2 additions & 0 deletions lib/puma/minissl.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

begin
require 'io/wait'
rescue LoadError
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/null_io.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Puma
# Provides an IO-like object that always appears to contain no data.
# Used as the value for rack.input when the request has no body.
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/plugin.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Puma
class UnknownPlugin < RuntimeError; end

Expand Down
2 changes: 2 additions & 0 deletions lib/puma/reactor.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/util'
require 'puma/minissl'

Expand Down
2 changes: 2 additions & 0 deletions lib/puma/runner.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/server'
require 'puma/const'

Expand Down
2 changes: 2 additions & 0 deletions lib/puma/server.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'stringio'

require 'puma/thread_pool'
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/single.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puma/runner'
require 'puma/detect'
require 'puma/plugin'
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/state_file.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'yaml'

module Puma
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/tcp_logger.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Puma
class TCPLogger
def initialize(logger, app, quiet=false)
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/thread_pool.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'thread'

module Puma
Expand Down
1 change: 1 addition & 0 deletions lib/puma/util.rb
@@ -1,3 +1,4 @@
# frozen_string_literal: true
major, minor, patch = RUBY_VERSION.split('.').map { |v| v.to_i }

if major == 1 && minor == 9 && patch == 3 && RUBY_PATCHLEVEL < 125
Expand Down

0 comments on commit 2668597

Please sign in to comment.