From 166593d625baf907c2ef23772e70071f129f4efb Mon Sep 17 00:00:00 2001 From: "Andrew N. Shalaev" Date: Fri, 24 Apr 2020 16:45:06 +0500 Subject: [PATCH] feature: add frozen_string_literal: true comment --- Gemfile | 1 + Rakefile | 1 + benchmarking/logging.rb | 1 + benchmarking/pipeline.rb | 1 + benchmarking/speed.rb | 1 + benchmarking/suite.rb | 1 + benchmarking/worker.rb | 1 + bin/build | 1 + bin/console | 1 + examples/basic.rb | 1 + examples/consistency.rb | 1 + examples/dist_redis.rb | 1 + examples/incr-decr.rb | 1 + examples/list.rb | 1 + examples/pubsub.rb | 1 + examples/sentinel.rb | 1 + examples/sentinel/start | 1 + examples/sets.rb | 1 + examples/unicorn/config.ru | 1 + examples/unicorn/unicorn.rb | 1 + lib/redis/connection.rb | 1 + lib/redis/connection/command_helper.rb | 1 + lib/redis/connection/hiredis.rb | 1 + lib/redis/connection/registry.rb | 1 + lib/redis/connection/ruby.rb | 1 + lib/redis/connection/synchrony.rb | 1 + lib/redis/distributed.rb | 1 + lib/redis/errors.rb | 1 + lib/redis/hash_ring.rb | 1 + lib/redis/pipeline.rb | 1 + lib/redis/subscribe.rb | 1 + lib/redis/version.rb | 1 + redis.gemspec | 1 + test/bitpos_test.rb | 1 + test/blocking_commands_test.rb | 1 + test/client_test.rb | 1 + test/command_map_test.rb | 1 + test/commands_on_geo_test.rb | 1 + test/commands_on_hashes_test.rb | 1 + test/commands_on_hyper_log_log_test.rb | 1 + test/commands_on_lists_test.rb | 1 + test/commands_on_sets_test.rb | 1 + test/commands_on_sorted_sets_test.rb | 1 + test/commands_on_strings_test.rb | 1 + test/commands_on_value_types_test.rb | 1 + test/connection_handling_test.rb | 1 + test/connection_test.rb | 1 + test/distributed_blocking_commands_test.rb | 1 + test/distributed_commands_on_hashes_test.rb | 1 + test/distributed_commands_on_hyper_log_log_test.rb | 1 + test/distributed_commands_on_lists_test.rb | 1 + test/distributed_commands_on_sets_test.rb | 1 + test/distributed_commands_on_sorted_sets_test.rb | 1 + test/distributed_commands_on_strings_test.rb | 1 + test/distributed_commands_on_value_types_test.rb | 1 + test/distributed_commands_requiring_clustering_test.rb | 1 + test/distributed_connection_handling_test.rb | 1 + test/distributed_internals_test.rb | 1 + test/distributed_key_tags_test.rb | 1 + test/distributed_persistence_control_commands_test.rb | 1 + test/distributed_publish_subscribe_test.rb | 1 + test/distributed_remote_server_control_commands_test.rb | 1 + test/distributed_scripting_test.rb | 1 + test/distributed_sorting_test.rb | 1 + test/distributed_test.rb | 1 + test/distributed_transactions_test.rb | 1 + test/encoding_test.rb | 1 + test/error_replies_test.rb | 1 + test/fork_safety_test.rb | 1 + test/helper_test.rb | 1 + test/internals_test.rb | 1 + test/lint/blocking_commands.rb | 1 + test/lint/hashes.rb | 1 + test/lint/hyper_log_log.rb | 1 + test/lint/lists.rb | 1 + test/lint/sets.rb | 1 + test/lint/sorted_sets.rb | 1 + test/lint/strings.rb | 1 + test/lint/value_types.rb | 1 + test/persistence_control_commands_test.rb | 1 + test/pipelining_commands_test.rb | 1 + test/publish_subscribe_test.rb | 1 + test/remote_server_control_commands_test.rb | 1 + test/scanning_test.rb | 1 + test/scripting_test.rb | 1 + test/sorting_test.rb | 1 + test/ssl_test.rb | 1 + test/support/connection/hiredis.rb | 1 + test/support/connection/ruby.rb | 1 + test/support/connection/synchrony.rb | 1 + test/support/redis_mock.rb | 1 + test/support/wire/synchrony.rb | 1 + test/support/wire/thread.rb | 1 + test/synchrony_driver.rb | 1 + test/thread_safety_test.rb | 1 + test/transactions_test.rb | 1 + test/unknown_commands_test.rb | 1 + test/url_param_test.rb | 1 + 98 files changed, 98 insertions(+) diff --git a/Gemfile b/Gemfile index 8cdf28680..dafdf4da5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ +# frozen_string_literal: true source 'https://rubygems.org' gemspec diff --git a/Rakefile b/Rakefile index 6ceed9722..080bebef2 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'bundler/gem_tasks' require 'rake/testtask' Rake::TestTask.new 'test' do |t| diff --git a/benchmarking/logging.rb b/benchmarking/logging.rb index 702ee28ee..828708629 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/bin/build b/bin/build index 778de8643..bfb27e6a5 100755 --- a/bin/build +++ b/bin/build @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true TARBALL = ARGV[0] diff --git a/bin/console b/bin/console index 8a3cd89ee..c2057a112 100755 --- a/bin/console +++ b/bin/console @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__)) require 'redis' 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 94c41b3b6..4366918a4 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/sentinel/start b/examples/sentinel/start index 46567e120..4a1fd1981 100755 --- a/examples/sentinel/start +++ b/examples/sentinel/start @@ -1,4 +1,5 @@ #! /usr/bin/env ruby +# frozen_string_literal: true # This is a helper script used together with examples/sentinel.rb # It runs two Redis masters, two slaves for each of them, and two sentinels. 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/config.ru b/examples/unicorn/config.ru index ede557351..31d0dd54c 100644 --- a/examples/unicorn/config.ru +++ b/examples/unicorn/config.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: true run lambda { |env| [200, {"Content-Type" => "text/plain"}, [Redis.current.randomkey]] } 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/connection.rb b/lib/redis/connection.rb index d8a51b334..869c97124 100644 --- a/lib/redis/connection.rb +++ b/lib/redis/connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "connection/registry" # If a connection driver was required before this file, the array diff --git a/lib/redis/connection/command_helper.rb b/lib/redis/connection/command_helper.rb index b1c2d0fd9..419ebe2a3 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 f7baf31b6..35ecfdf99 100644 --- a/lib/redis/connection/hiredis.rb +++ b/lib/redis/connection/hiredis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "registry" require_relative "../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 ce9411084..56a66d87d 100644 --- a/lib/redis/connection/ruby.rb +++ b/lib/redis/connection/ruby.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "registry" require_relative "command_helper" require_relative "../errors" diff --git a/lib/redis/connection/synchrony.rb b/lib/redis/connection/synchrony.rb index e15fd627d..4925fef53 100644 --- a/lib/redis/connection/synchrony.rb +++ b/lib/redis/connection/synchrony.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "command_helper" require_relative "registry" require_relative "../errors" diff --git a/lib/redis/distributed.rb b/lib/redis/distributed.rb index bfc65e657..f308bd410 100644 --- a/lib/redis/distributed.rb +++ b/lib/redis/distributed.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "hash_ring" class Redis diff --git a/lib/redis/errors.rb b/lib/redis/errors.rb index 1483edb62..ff5fd8c9d 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 e1c93b25a..a9c0498a1 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 707df2ec2..038f9fa51 100644 --- a/lib/redis/pipeline.rb +++ b/lib/redis/pipeline.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Redis class Pipeline attr_accessor :db diff --git a/lib/redis/subscribe.rb b/lib/redis/subscribe.rb index 3029d048c..4c2660556 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 1f6803b05..4ba3a4a45 100644 --- a/lib/redis/version.rb +++ b/lib/redis/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Redis VERSION = '4.1.3' end diff --git a/redis.gemspec b/redis.gemspec index bb93bdcce..7d8011490 100644 --- a/redis.gemspec +++ b/redis.gemspec @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "./lib/redis/version" Gem::Specification.new do |s| diff --git a/test/bitpos_test.rb b/test/bitpos_test.rb index 896ad62cf..06b034eba 100644 --- a/test/bitpos_test.rb +++ b/test/bitpos_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestBitpos < Minitest::Test diff --git a/test/blocking_commands_test.rb b/test/blocking_commands_test.rb index 3715db85a..6b1cf9255 100644 --- a/test/blocking_commands_test.rb +++ b/test/blocking_commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/blocking_commands' diff --git a/test/client_test.rb b/test/client_test.rb index ca451a181..163492e1d 100644 --- a/test/client_test.rb +++ b/test/client_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestClient < Minitest::Test diff --git a/test/command_map_test.rb b/test/command_map_test.rb index f861ba6b2..f2bba1a6d 100644 --- a/test/command_map_test.rb +++ b/test/command_map_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestCommandMap < Minitest::Test diff --git a/test/commands_on_geo_test.rb b/test/commands_on_geo_test.rb index 3c0878c62..c0a93e026 100644 --- a/test/commands_on_geo_test.rb +++ b/test/commands_on_geo_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestCommandsGeo < Minitest::Test diff --git a/test/commands_on_hashes_test.rb b/test/commands_on_hashes_test.rb index e99f1b247..b90311ae6 100644 --- a/test/commands_on_hashes_test.rb +++ b/test/commands_on_hashes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/hashes' diff --git a/test/commands_on_hyper_log_log_test.rb b/test/commands_on_hyper_log_log_test.rb index 8625dff5c..5f9a9821c 100644 --- a/test/commands_on_hyper_log_log_test.rb +++ b/test/commands_on_hyper_log_log_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/hyper_log_log' diff --git a/test/commands_on_lists_test.rb b/test/commands_on_lists_test.rb index 9838f5744..9c4d43f86 100644 --- a/test/commands_on_lists_test.rb +++ b/test/commands_on_lists_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/lists' diff --git a/test/commands_on_sets_test.rb b/test/commands_on_sets_test.rb index 40dee9715..85513d90c 100644 --- a/test/commands_on_sets_test.rb +++ b/test/commands_on_sets_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/sets' diff --git a/test/commands_on_sorted_sets_test.rb b/test/commands_on_sorted_sets_test.rb index fbdce7dab..b1c764517 100644 --- a/test/commands_on_sorted_sets_test.rb +++ b/test/commands_on_sorted_sets_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/sorted_sets' diff --git a/test/commands_on_strings_test.rb b/test/commands_on_strings_test.rb index d3b2c274c..d88e6a538 100644 --- a/test/commands_on_strings_test.rb +++ b/test/commands_on_strings_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/strings' diff --git a/test/commands_on_value_types_test.rb b/test/commands_on_value_types_test.rb index 5dd65257c..ff61fa13b 100644 --- a/test/commands_on_value_types_test.rb +++ b/test/commands_on_value_types_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" require_relative "lint/value_types" diff --git a/test/connection_handling_test.rb b/test/connection_handling_test.rb index 792b166a7..df857b5e1 100644 --- a/test/connection_handling_test.rb +++ b/test/connection_handling_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestConnectionHandling < Minitest::Test diff --git a/test/connection_test.rb b/test/connection_test.rb index d641ad896..a6b0bacea 100644 --- a/test/connection_test.rb +++ b/test/connection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestConnection < Minitest::Test diff --git a/test/distributed_blocking_commands_test.rb b/test/distributed_blocking_commands_test.rb index 2a2bcc477..b988e7201 100644 --- a/test/distributed_blocking_commands_test.rb +++ b/test/distributed_blocking_commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/blocking_commands' diff --git a/test/distributed_commands_on_hashes_test.rb b/test/distributed_commands_on_hashes_test.rb index b9ae2e3c3..d76de7b73 100644 --- a/test/distributed_commands_on_hashes_test.rb +++ b/test/distributed_commands_on_hashes_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative '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 f4a68e053..404ba2d52 100644 --- a/test/distributed_commands_on_hyper_log_log_test.rb +++ b/test/distributed_commands_on_hyper_log_log_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/hyper_log_log' diff --git a/test/distributed_commands_on_lists_test.rb b/test/distributed_commands_on_lists_test.rb index bcd4ab40d..1ccb63117 100644 --- a/test/distributed_commands_on_lists_test.rb +++ b/test/distributed_commands_on_lists_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/lists' diff --git a/test/distributed_commands_on_sets_test.rb b/test/distributed_commands_on_sets_test.rb index b0ce4dbb5..71531d169 100644 --- a/test/distributed_commands_on_sets_test.rb +++ b/test/distributed_commands_on_sets_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/sets' diff --git a/test/distributed_commands_on_sorted_sets_test.rb b/test/distributed_commands_on_sorted_sets_test.rb index 9ddec03df..7a641e32c 100644 --- a/test/distributed_commands_on_sorted_sets_test.rb +++ b/test/distributed_commands_on_sorted_sets_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative 'helper' require_relative 'lint/sorted_sets' diff --git a/test/distributed_commands_on_strings_test.rb b/test/distributed_commands_on_strings_test.rb index 3e14f07d0..1b1a24060 100644 --- a/test/distributed_commands_on_strings_test.rb +++ b/test/distributed_commands_on_strings_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" require_relative "lint/strings" diff --git a/test/distributed_commands_on_value_types_test.rb b/test/distributed_commands_on_value_types_test.rb index 1b665b5ee..810bfeec3 100644 --- a/test/distributed_commands_on_value_types_test.rb +++ b/test/distributed_commands_on_value_types_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" require_relative "lint/value_types" diff --git a/test/distributed_commands_requiring_clustering_test.rb b/test/distributed_commands_requiring_clustering_test.rb index 2b7b44040..c4a047bfe 100644 --- a/test/distributed_commands_requiring_clustering_test.rb +++ b/test/distributed_commands_requiring_clustering_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedCommandsRequiringClustering < Minitest::Test diff --git a/test/distributed_connection_handling_test.rb b/test/distributed_connection_handling_test.rb index a7f9c2fbc..8c9532175 100644 --- a/test/distributed_connection_handling_test.rb +++ b/test/distributed_connection_handling_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedConnectionHandling < Minitest::Test diff --git a/test/distributed_internals_test.rb b/test/distributed_internals_test.rb index b82602f97..05f590b42 100644 --- a/test/distributed_internals_test.rb +++ b/test/distributed_internals_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedInternals < Minitest::Test diff --git a/test/distributed_key_tags_test.rb b/test/distributed_key_tags_test.rb index 9e67fc4d0..54ad45bd6 100644 --- a/test/distributed_key_tags_test.rb +++ b/test/distributed_key_tags_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedKeyTags < Minitest::Test diff --git a/test/distributed_persistence_control_commands_test.rb b/test/distributed_persistence_control_commands_test.rb index 238fb8750..f6eada2ff 100644 --- a/test/distributed_persistence_control_commands_test.rb +++ b/test/distributed_persistence_control_commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedPersistenceControlCommands < Minitest::Test diff --git a/test/distributed_publish_subscribe_test.rb b/test/distributed_publish_subscribe_test.rb index 6d0b77950..fa6af86f2 100644 --- a/test/distributed_publish_subscribe_test.rb +++ b/test/distributed_publish_subscribe_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedPublishSubscribe < Minitest::Test diff --git a/test/distributed_remote_server_control_commands_test.rb b/test/distributed_remote_server_control_commands_test.rb index 0ea8ac67e..8947007e7 100644 --- a/test/distributed_remote_server_control_commands_test.rb +++ b/test/distributed_remote_server_control_commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedRemoteServerControlCommands < Minitest::Test diff --git a/test/distributed_scripting_test.rb b/test/distributed_scripting_test.rb index 435bdcd7a..a2f73fe4b 100644 --- a/test/distributed_scripting_test.rb +++ b/test/distributed_scripting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedScripting < Minitest::Test diff --git a/test/distributed_sorting_test.rb b/test/distributed_sorting_test.rb index 793533c17..f8ef0d765 100644 --- a/test/distributed_sorting_test.rb +++ b/test/distributed_sorting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedSorting < Minitest::Test diff --git a/test/distributed_test.rb b/test/distributed_test.rb index ce0a98a0d..60f7b4b61 100644 --- a/test/distributed_test.rb +++ b/test/distributed_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributed < Minitest::Test diff --git a/test/distributed_transactions_test.rb b/test/distributed_transactions_test.rb index 457765eb0..e1398fff2 100644 --- a/test/distributed_transactions_test.rb +++ b/test/distributed_transactions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestDistributedTransactions < Minitest::Test diff --git a/test/encoding_test.rb b/test/encoding_test.rb index 0fd499273..1d6cd1d93 100644 --- a/test/encoding_test.rb +++ b/test/encoding_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestEncoding < Minitest::Test diff --git a/test/error_replies_test.rb b/test/error_replies_test.rb index f5b4bef3b..c04d120f1 100644 --- a/test/error_replies_test.rb +++ b/test/error_replies_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestErrorReplies < Minitest::Test diff --git a/test/fork_safety_test.rb b/test/fork_safety_test.rb index a1359b31d..d4fbb54da 100644 --- a/test/fork_safety_test.rb +++ b/test/fork_safety_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestForkSafety < Minitest::Test diff --git a/test/helper_test.rb b/test/helper_test.rb index bfa65661e..a2c133dc2 100644 --- a/test/helper_test.rb +++ b/test/helper_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestHelper < Minitest::Test diff --git a/test/internals_test.rb b/test/internals_test.rb index 4d7c0b478..e7935feca 100644 --- a/test/internals_test.rb +++ b/test/internals_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestInternals < Minitest::Test diff --git a/test/lint/blocking_commands.rb b/test/lint/blocking_commands.rb index 82d43dd2c..8a85655b6 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 def setup diff --git a/test/lint/hashes.rb b/test/lint/hashes.rb index 65f36f5e7..95daf5412 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 f56fed8f6..eacd33e66 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 5a9fb5309..fb96c3219 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 41c7f9091..72204344d 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 827362347..eead9ee24 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 b17e004c8..ce998022f 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 1c618e7d0..46ad5f2f9 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 7f51b306d..cb1e25810 100644 --- a/test/persistence_control_commands_test.rb +++ b/test/persistence_control_commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestPersistenceControlCommands < Minitest::Test diff --git a/test/pipelining_commands_test.rb b/test/pipelining_commands_test.rb index 32a6a6389..e99fe9f02 100644 --- a/test/pipelining_commands_test.rb +++ b/test/pipelining_commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestPipeliningCommands < Minitest::Test diff --git a/test/publish_subscribe_test.rb b/test/publish_subscribe_test.rb index daddb185c..c725a1429 100644 --- a/test/publish_subscribe_test.rb +++ b/test/publish_subscribe_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestPublishSubscribe < Minitest::Test diff --git a/test/remote_server_control_commands_test.rb b/test/remote_server_control_commands_test.rb index 84713cf64..a9749a506 100644 --- a/test/remote_server_control_commands_test.rb +++ b/test/remote_server_control_commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestRemoteServerControlCommands < Minitest::Test diff --git a/test/scanning_test.rb b/test/scanning_test.rb index 3d5f25610..20c968a41 100644 --- a/test/scanning_test.rb +++ b/test/scanning_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestScanning < Minitest::Test diff --git a/test/scripting_test.rb b/test/scripting_test.rb index da58311f7..d99394f6d 100644 --- a/test/scripting_test.rb +++ b/test/scripting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestScripting < Minitest::Test diff --git a/test/sorting_test.rb b/test/sorting_test.rb index cde1a8ba0..d21871a39 100644 --- a/test/sorting_test.rb +++ b/test/sorting_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestSorting < Minitest::Test diff --git a/test/ssl_test.rb b/test/ssl_test.rb index 771a2311b..d7caa8355 100644 --- a/test/ssl_test.rb +++ b/test/ssl_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class SslTest < Minitest::Test diff --git a/test/support/connection/hiredis.rb b/test/support/connection/hiredis.rb index 46078c1c5..03930dd31 100644 --- a/test/support/connection/hiredis.rb +++ b/test/support/connection/hiredis.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require_relative "../wire/thread" diff --git a/test/support/connection/ruby.rb b/test/support/connection/ruby.rb index 46078c1c5..03930dd31 100644 --- a/test/support/connection/ruby.rb +++ b/test/support/connection/ruby.rb @@ -1 +1,2 @@ +# frozen_string_literal: true require_relative "../wire/thread" diff --git a/test/support/connection/synchrony.rb b/test/support/connection/synchrony.rb index 90b516b5f..509674f47 100644 --- a/test/support/connection/synchrony.rb +++ b/test/support/connection/synchrony.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "../wire/synchrony" module Helper diff --git a/test/support/redis_mock.rb b/test/support/redis_mock.rb index 429767b7b..b6335f8a2 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 044fa9593..7c37b6fa8 100644 --- a/test/synchrony_driver.rb +++ b/test/synchrony_driver.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "em-synchrony" require "em-synchrony/connection_pool" diff --git a/test/thread_safety_test.rb b/test/thread_safety_test.rb index 820a8b54a..ac71e4865 100644 --- a/test/thread_safety_test.rb +++ b/test/thread_safety_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestThreadSafety < Minitest::Test diff --git a/test/transactions_test.rb b/test/transactions_test.rb index 7923a76fe..ce700f879 100644 --- a/test/transactions_test.rb +++ b/test/transactions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestTransactions < Minitest::Test diff --git a/test/unknown_commands_test.rb b/test/unknown_commands_test.rb index 1d193b284..0d94b8c95 100644 --- a/test/unknown_commands_test.rb +++ b/test/unknown_commands_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestUnknownCommands < Minitest::Test diff --git a/test/url_param_test.rb b/test/url_param_test.rb index 629be99ea..324597636 100644 --- a/test/url_param_test.rb +++ b/test/url_param_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "helper" class TestUrlParam < Minitest::Test