diff --git a/benchmarking/logging.rb b/benchmarking/logging.rb index 353e91bd0..3d9949457 100644 --- a/benchmarking/logging.rb +++ b/benchmarking/logging.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Run with # # $ ruby -Ilib benchmarking/logging.rb diff --git a/benchmarking/pipeline.rb b/benchmarking/pipeline.rb index ecc98ba2d..f7efacaba 100644 --- a/benchmarking/pipeline.rb +++ b/benchmarking/pipeline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "benchmark" $:.push File.join(File.dirname(__FILE__), 'lib') diff --git a/benchmarking/speed.rb b/benchmarking/speed.rb index 3780bffb6..1bd07bd90 100644 --- a/benchmarking/speed.rb +++ b/benchmarking/speed.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Run with # # $ ruby -Ilib benchmarking/speed.rb diff --git a/benchmarking/suite.rb b/benchmarking/suite.rb index 55fd1d660..87a23a2a7 100644 --- a/benchmarking/suite.rb +++ b/benchmarking/suite.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'fileutils' def run_in_background(command) diff --git a/benchmarking/worker.rb b/benchmarking/worker.rb index 836d03b06..422f0317d 100644 --- a/benchmarking/worker.rb +++ b/benchmarking/worker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true BENCHMARK_ROOT = File.dirname(__FILE__) REDIS_ROOT = File.join(BENCHMARK_ROOT, "..", "lib") diff --git a/examples/basic.rb b/examples/basic.rb index 7800cf794..d97384e88 100644 --- a/examples/basic.rb +++ b/examples/basic.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'redis' r = Redis.new diff --git a/examples/consistency.rb b/examples/consistency.rb index df34e1ab9..73fefc4a3 100644 --- a/examples/consistency.rb +++ b/examples/consistency.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This file implements a simple consistency test for Redis-rb (or any other # Redis environment if you pass a different client object) where a client # writes to the database using INCR in order to increment keys, but actively diff --git a/examples/dist_redis.rb b/examples/dist_redis.rb index fe1c5da72..e1c2f114c 100644 --- a/examples/dist_redis.rb +++ b/examples/dist_redis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis" require "redis/distributed" diff --git a/examples/incr-decr.rb b/examples/incr-decr.rb index 98ff9d15c..498aedc5f 100644 --- a/examples/incr-decr.rb +++ b/examples/incr-decr.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'redis' r = Redis.new diff --git a/examples/list.rb b/examples/list.rb index b2f25cbaa..82b3901aa 100644 --- a/examples/list.rb +++ b/examples/list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rubygems' require 'redis' diff --git a/examples/pubsub.rb b/examples/pubsub.rb index 9da15065d..bb57b4f70 100644 --- a/examples/pubsub.rb +++ b/examples/pubsub.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis" puts <<-EOS diff --git a/examples/sentinel.rb b/examples/sentinel.rb index 62fc5a4c4..545d81649 100644 --- a/examples/sentinel.rb +++ b/examples/sentinel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'redis' # This example creates a master-slave setup with a sentinel, then connects to diff --git a/examples/sets.rb b/examples/sets.rb index 31c49c38c..902cd9d09 100644 --- a/examples/sets.rb +++ b/examples/sets.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rubygems' require 'redis' diff --git a/examples/unicorn/unicorn.rb b/examples/unicorn/unicorn.rb index 957d3840e..1c276d554 100644 --- a/examples/unicorn/unicorn.rb +++ b/examples/unicorn/unicorn.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis" worker_processes 3 diff --git a/lib/redis.rb b/lib/redis.rb index 3344669a0..878558c4f 100644 --- a/lib/redis.rb +++ b/lib/redis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "monitor" require "redis/errors" diff --git a/lib/redis/client.rb b/lib/redis/client.rb index e4d0574a9..138493af0 100644 --- a/lib/redis/client.rb +++ b/lib/redis/client.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis/errors" require "socket" require "cgi" diff --git a/lib/redis/connection.rb b/lib/redis/connection.rb index badff22b9..ec5f784bb 100644 --- a/lib/redis/connection.rb +++ b/lib/redis/connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis/connection/registry" # If a connection driver was required before this file, the array @@ -6,4 +7,4 @@ # the plain Ruby driver as our default. Another driver can be required at a # later point in time, causing it to be the last element of the #drivers array # and therefore be chosen by default. -require "redis/connection/ruby" if Redis::Connection.drivers.empty? \ No newline at end of file +require "redis/connection/ruby" if Redis::Connection.drivers.empty? diff --git a/lib/redis/connection/command_helper.rb b/lib/redis/connection/command_helper.rb index 74e89dc10..41027562a 100644 --- a/lib/redis/connection/command_helper.rb +++ b/lib/redis/connection/command_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Redis module Connection module CommandHelper diff --git a/lib/redis/connection/hiredis.rb b/lib/redis/connection/hiredis.rb index a3e074779..1c0342d07 100644 --- a/lib/redis/connection/hiredis.rb +++ b/lib/redis/connection/hiredis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis/connection/registry" require "redis/errors" require "hiredis/connection" diff --git a/lib/redis/connection/registry.rb b/lib/redis/connection/registry.rb index 69ca63d3e..ba3d538bf 100644 --- a/lib/redis/connection/registry.rb +++ b/lib/redis/connection/registry.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Redis module Connection diff --git a/lib/redis/connection/ruby.rb b/lib/redis/connection/ruby.rb index 61e4c8ab7..a19864944 100644 --- a/lib/redis/connection/ruby.rb +++ b/lib/redis/connection/ruby.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis/connection/registry" require "redis/connection/command_helper" require "redis/errors" @@ -13,7 +14,7 @@ def initialize(*args) super(*args) @timeout = nil - @buffer = "" + @buffer = String.new("") end def timeout=(timeout) diff --git a/lib/redis/connection/synchrony.rb b/lib/redis/connection/synchrony.rb index 6e30feca6..c106f0185 100644 --- a/lib/redis/connection/synchrony.rb +++ b/lib/redis/connection/synchrony.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis/connection/command_helper" require "redis/connection/registry" require "redis/errors" diff --git a/lib/redis/distributed.rb b/lib/redis/distributed.rb index 4bda232a4..9ea0ba349 100644 --- a/lib/redis/distributed.rb +++ b/lib/redis/distributed.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redis/hash_ring" class Redis diff --git a/lib/redis/errors.rb b/lib/redis/errors.rb index 85b222ec6..1e4ca9eb2 100644 --- a/lib/redis/errors.rb +++ b/lib/redis/errors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Redis # Base error for all redis-rb errors. class BaseError < RuntimeError diff --git a/lib/redis/hash_ring.rb b/lib/redis/hash_ring.rb index 2a199bd53..5c5142bda 100644 --- a/lib/redis/hash_ring.rb +++ b/lib/redis/hash_ring.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'zlib' class Redis diff --git a/lib/redis/pipeline.rb b/lib/redis/pipeline.rb index a77f86d9b..821f8ba27 100644 --- a/lib/redis/pipeline.rb +++ b/lib/redis/pipeline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Redis unless defined?(::BasicObject) class BasicObject diff --git a/lib/redis/subscribe.rb b/lib/redis/subscribe.rb index 155149d74..8fe59d908 100644 --- a/lib/redis/subscribe.rb +++ b/lib/redis/subscribe.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Redis class SubscribedClient def initialize(client) diff --git a/lib/redis/version.rb b/lib/redis/version.rb index c11792d74..a9dfe2ed3 100644 --- a/lib/redis/version.rb +++ b/lib/redis/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Redis VERSION = "3.2.2" end diff --git a/test/bitpos_test.rb b/test/bitpos_test.rb index 118294da7..ed9f2e83d 100644 --- a/test/bitpos_test.rb +++ b/test/bitpos_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/blocking_commands_test.rb b/test/blocking_commands_test.rb index 4a2a9652d..a34a5ca43 100644 --- a/test/blocking_commands_test.rb +++ b/test/blocking_commands_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/blocking_commands" diff --git a/test/command_map_test.rb b/test/command_map_test.rb index cb401db36..78072e6a4 100644 --- a/test/command_map_test.rb +++ b/test/command_map_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/commands_on_hashes_test.rb b/test/commands_on_hashes_test.rb index f3bbfa5b3..6f2c31c52 100644 --- a/test/commands_on_hashes_test.rb +++ b/test/commands_on_hashes_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/hashes" diff --git a/test/commands_on_hyper_log_log_test.rb b/test/commands_on_hyper_log_log_test.rb index a2fc95be1..21a0b3eb8 100644 --- a/test/commands_on_hyper_log_log_test.rb +++ b/test/commands_on_hyper_log_log_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/hyper_log_log" @@ -18,4 +19,4 @@ def test_pfmerge end end -end \ No newline at end of file +end diff --git a/test/commands_on_lists_test.rb b/test/commands_on_lists_test.rb index 2916c2854..4cc3fd62b 100644 --- a/test/commands_on_lists_test.rb +++ b/test/commands_on_lists_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/lists" diff --git a/test/commands_on_sets_test.rb b/test/commands_on_sets_test.rb index 7ac2f4e03..06972fbf6 100644 --- a/test/commands_on_sets_test.rb +++ b/test/commands_on_sets_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/sets" diff --git a/test/commands_on_sorted_sets_test.rb b/test/commands_on_sorted_sets_test.rb index 0a424be50..958d516af 100644 --- a/test/commands_on_sorted_sets_test.rb +++ b/test/commands_on_sorted_sets_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/sorted_sets" diff --git a/test/commands_on_strings_test.rb b/test/commands_on_strings_test.rb index 9172aaccd..7ff968a1b 100644 --- a/test/commands_on_strings_test.rb +++ b/test/commands_on_strings_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/strings" diff --git a/test/commands_on_value_types_test.rb b/test/commands_on_value_types_test.rb index 6b2f211ca..ecef24868 100644 --- a/test/commands_on_value_types_test.rb +++ b/test/commands_on_value_types_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/value_types" diff --git a/test/connection_handling_test.rb b/test/connection_handling_test.rb index 7266d57e0..97d398f1d 100644 --- a/test/connection_handling_test.rb +++ b/test/connection_handling_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_blocking_commands_test.rb b/test/distributed_blocking_commands_test.rb index b28cf2743..5d06bb858 100644 --- a/test/distributed_blocking_commands_test.rb +++ b/test/distributed_blocking_commands_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/blocking_commands" diff --git a/test/distributed_commands_on_hashes_test.rb b/test/distributed_commands_on_hashes_test.rb index ffd14f519..6c96ec053 100644 --- a/test/distributed_commands_on_hashes_test.rb +++ b/test/distributed_commands_on_hashes_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/hashes" diff --git a/test/distributed_commands_on_hyper_log_log_test.rb b/test/distributed_commands_on_hyper_log_log_test.rb index c118b9574..1f74da948 100644 --- a/test/distributed_commands_on_hyper_log_log_test.rb +++ b/test/distributed_commands_on_hyper_log_log_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/hyper_log_log" diff --git a/test/distributed_commands_on_lists_test.rb b/test/distributed_commands_on_lists_test.rb index d22f3be80..648e59fb2 100644 --- a/test/distributed_commands_on_lists_test.rb +++ b/test/distributed_commands_on_lists_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/lists" diff --git a/test/distributed_commands_on_sets_test.rb b/test/distributed_commands_on_sets_test.rb index 43a070c8c..558683218 100644 --- a/test/distributed_commands_on_sets_test.rb +++ b/test/distributed_commands_on_sets_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/sets" diff --git a/test/distributed_commands_on_sorted_sets_test.rb b/test/distributed_commands_on_sorted_sets_test.rb index a4150b834..9c6030fbc 100644 --- a/test/distributed_commands_on_sorted_sets_test.rb +++ b/test/distributed_commands_on_sorted_sets_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/sorted_sets" diff --git a/test/distributed_commands_on_strings_test.rb b/test/distributed_commands_on_strings_test.rb index ad83c12e5..293e67806 100644 --- a/test/distributed_commands_on_strings_test.rb +++ b/test/distributed_commands_on_strings_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/strings" diff --git a/test/distributed_commands_on_value_types_test.rb b/test/distributed_commands_on_value_types_test.rb index 0be9ce298..a10641cf7 100644 --- a/test/distributed_commands_on_value_types_test.rb +++ b/test/distributed_commands_on_value_types_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) require "lint/value_types" diff --git a/test/distributed_commands_requiring_clustering_test.rb b/test/distributed_commands_requiring_clustering_test.rb index da8063c56..0c9f50e8a 100644 --- a/test/distributed_commands_requiring_clustering_test.rb +++ b/test/distributed_commands_requiring_clustering_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_connection_handling_test.rb b/test/distributed_connection_handling_test.rb index 330886090..261943c05 100644 --- a/test/distributed_connection_handling_test.rb +++ b/test/distributed_connection_handling_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_internals_test.rb b/test/distributed_internals_test.rb index d5671a23b..58cb38f6a 100644 --- a/test/distributed_internals_test.rb +++ b/test/distributed_internals_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_key_tags_test.rb b/test/distributed_key_tags_test.rb index 12b6d688d..b919c550b 100644 --- a/test/distributed_key_tags_test.rb +++ b/test/distributed_key_tags_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_persistence_control_commands_test.rb b/test/distributed_persistence_control_commands_test.rb index c24360192..dea9cf7be 100644 --- a/test/distributed_persistence_control_commands_test.rb +++ b/test/distributed_persistence_control_commands_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_publish_subscribe_test.rb b/test/distributed_publish_subscribe_test.rb index df36506d9..afec420f6 100644 --- a/test/distributed_publish_subscribe_test.rb +++ b/test/distributed_publish_subscribe_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_remote_server_control_commands_test.rb b/test/distributed_remote_server_control_commands_test.rb index 7799d4fce..1306fdefc 100644 --- a/test/distributed_remote_server_control_commands_test.rb +++ b/test/distributed_remote_server_control_commands_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_scripting_test.rb b/test/distributed_scripting_test.rb index 00bdaa622..36ea3fff1 100644 --- a/test/distributed_scripting_test.rb +++ b/test/distributed_scripting_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_sorting_test.rb b/test/distributed_sorting_test.rb index 4ae3cf575..9db294f7f 100644 --- a/test/distributed_sorting_test.rb +++ b/test/distributed_sorting_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_test.rb b/test/distributed_test.rb index b55287bde..bfda5bd58 100644 --- a/test/distributed_test.rb +++ b/test/distributed_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/distributed_transactions_test.rb b/test/distributed_transactions_test.rb index abfb8aa3c..c7075da00 100644 --- a/test/distributed_transactions_test.rb +++ b/test/distributed_transactions_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/encoding_test.rb b/test/encoding_test.rb index cb54bcb2a..df1eec7cd 100644 --- a/test/encoding_test.rb +++ b/test/encoding_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/error_replies_test.rb b/test/error_replies_test.rb index 08ec81e15..b446049a8 100644 --- a/test/error_replies_test.rb +++ b/test/error_replies_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/fork_safety_test.rb b/test/fork_safety_test.rb index a49d5b46d..8a6dc0255 100644 --- a/test/fork_safety_test.rb +++ b/test/fork_safety_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/helper.rb b/test/helper.rb index 169440728..bc6b29226 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $:.unshift File.expand_path("../lib", File.dirname(__FILE__)) $:.unshift File.expand_path(File.dirname(__FILE__)) diff --git a/test/helper_test.rb b/test/helper_test.rb index 23da68dce..812f6f4e1 100644 --- a/test/helper_test.rb +++ b/test/helper_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/internals_test.rb b/test/internals_test.rb index 865c60020..c9414d13b 100644 --- a/test/internals_test.rb +++ b/test/internals_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/lint/blocking_commands.rb b/test/lint/blocking_commands.rb index a4e25d588..8147ffc24 100644 --- a/test/lint/blocking_commands.rb +++ b/test/lint/blocking_commands.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Lint module BlockingCommands diff --git a/test/lint/hashes.rb b/test/lint/hashes.rb index 649e6673f..8a7edf8d1 100644 --- a/test/lint/hashes.rb +++ b/test/lint/hashes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Lint module Hashes diff --git a/test/lint/hyper_log_log.rb b/test/lint/hyper_log_log.rb index 5472e22f5..2121d3f8a 100644 --- a/test/lint/hyper_log_log.rb +++ b/test/lint/hyper_log_log.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Lint module HyperLogLog diff --git a/test/lint/lists.rb b/test/lint/lists.rb index 3a230f675..2fcad414c 100644 --- a/test/lint/lists.rb +++ b/test/lint/lists.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Lint module Lists diff --git a/test/lint/sets.rb b/test/lint/sets.rb index 7342f138e..db94d9b4f 100644 --- a/test/lint/sets.rb +++ b/test/lint/sets.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Lint module Sets diff --git a/test/lint/sorted_sets.rb b/test/lint/sorted_sets.rb index 363dfe004..4d87770fe 100644 --- a/test/lint/sorted_sets.rb +++ b/test/lint/sorted_sets.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Lint module SortedSets diff --git a/test/lint/strings.rb b/test/lint/strings.rb index 381df3cdc..e356f09b6 100644 --- a/test/lint/strings.rb +++ b/test/lint/strings.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Lint module Strings diff --git a/test/lint/value_types.rb b/test/lint/value_types.rb index c4deb233d..dc862dd7e 100644 --- a/test/lint/value_types.rb +++ b/test/lint/value_types.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Lint module ValueTypes diff --git a/test/persistence_control_commands_test.rb b/test/persistence_control_commands_test.rb index 281657152..a74f70886 100644 --- a/test/persistence_control_commands_test.rb +++ b/test/persistence_control_commands_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/pipelining_commands_test.rb b/test/pipelining_commands_test.rb index 82cd92f80..96eec272b 100644 --- a/test/pipelining_commands_test.rb +++ b/test/pipelining_commands_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/publish_subscribe_test.rb b/test/publish_subscribe_test.rb index b111c4fa8..45e428f10 100644 --- a/test/publish_subscribe_test.rb +++ b/test/publish_subscribe_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/remote_server_control_commands_test.rb b/test/remote_server_control_commands_test.rb index b5cbd452e..7e2f71144 100644 --- a/test/remote_server_control_commands_test.rb +++ b/test/remote_server_control_commands_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/scanning_test.rb b/test/scanning_test.rb index 9a4cf7dbf..8a9dd75df 100644 --- a/test/scanning_test.rb +++ b/test/scanning_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/scripting_test.rb b/test/scripting_test.rb index 82d0d89e2..bdc4dd39d 100644 --- a/test/scripting_test.rb +++ b/test/scripting_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/sentinel_command_test.rb b/test/sentinel_command_test.rb index d61fa0763..4c98cb189 100644 --- a/test/sentinel_command_test.rb +++ b/test/sentinel_command_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/sentinel_test.rb b/test/sentinel_test.rb index 1eff251b4..5eef1e670 100644 --- a/test/sentinel_test.rb +++ b/test/sentinel_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/sorting_test.rb b/test/sorting_test.rb index e8aec56a9..daebc2026 100644 --- a/test/sorting_test.rb +++ b/test/sorting_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/support/connection/hiredis.rb b/test/support/connection/hiredis.rb index f2ccbca5f..51a1fbd86 100644 --- a/test/support/connection/hiredis.rb +++ b/test/support/connection/hiredis.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "support/wire/thread" diff --git a/test/support/connection/ruby.rb b/test/support/connection/ruby.rb index f2ccbca5f..51a1fbd86 100644 --- a/test/support/connection/ruby.rb +++ b/test/support/connection/ruby.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require "support/wire/thread" diff --git a/test/support/connection/synchrony.rb b/test/support/connection/synchrony.rb index 80acb0afe..71fa835d7 100644 --- a/test/support/connection/synchrony.rb +++ b/test/support/connection/synchrony.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "support/wire/synchrony" module Helper diff --git a/test/support/redis_mock.rb b/test/support/redis_mock.rb index d8dfaf355..d9206b707 100644 --- a/test/support/redis_mock.rb +++ b/test/support/redis_mock.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "socket" module RedisMock diff --git a/test/support/wire/synchrony.rb b/test/support/wire/synchrony.rb index f27d4481c..db541d832 100644 --- a/test/support/wire/synchrony.rb +++ b/test/support/wire/synchrony.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Wire < Fiber # We cannot run this fiber explicitly because EM schedules it. Resuming the # current fiber on the next tick to let the reactor do work. diff --git a/test/support/wire/thread.rb b/test/support/wire/thread.rb index aa5a67c92..e0c7e68fb 100644 --- a/test/support/wire/thread.rb +++ b/test/support/wire/thread.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Wire < Thread def self.sleep(sec) Kernel.sleep(sec) diff --git a/test/synchrony_driver.rb b/test/synchrony_driver.rb index 82b13a794..2a23c4d3a 100644 --- a/test/synchrony_driver.rb +++ b/test/synchrony_driver.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require 'em-synchrony' require 'em-synchrony/connection_pool' diff --git a/test/test.conf.erb b/test/test.conf.erb index 051cb80dd..5dc29feea 100644 --- a/test/test.conf.erb +++ b/test/test.conf.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> dir <%= REDIS_DIR %> pidfile <%= REDIS_PID %> port 6381 diff --git a/test/thread_safety_test.rb b/test/thread_safety_test.rb index 817f82386..72643b82b 100644 --- a/test/thread_safety_test.rb +++ b/test/thread_safety_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/transactions_test.rb b/test/transactions_test.rb index 3f588b29f..40e2cf2aa 100644 --- a/test/transactions_test.rb +++ b/test/transactions_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/unknown_commands_test.rb b/test/unknown_commands_test.rb index 0d1ca5827..f1927b31b 100644 --- a/test/unknown_commands_test.rb +++ b/test/unknown_commands_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__)) diff --git a/test/url_param_test.rb b/test/url_param_test.rb index 468bbf1f7..9a62efd9a 100644 --- a/test/url_param_test.rb +++ b/test/url_param_test.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("helper", File.dirname(__FILE__))