From 8f6206bfc84dbf719dcfdfbf034fffff2473e15a Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Jun 2017 09:24:13 +0900 Subject: [PATCH 1/3] Specify frozen_string_literal: false --- doc/jamis.rb | 1 + lib/rake.rb | 1 + lib/rake/application.rb | 1 + lib/rake/backtrace.rb | 1 + lib/rake/clean.rb | 1 + lib/rake/cloneable.rb | 1 + lib/rake/cpu_counter.rb | 1 + lib/rake/default_loader.rb | 1 + lib/rake/dsl_definition.rb | 1 + lib/rake/early_time.rb | 1 + lib/rake/ext/core.rb | 1 + lib/rake/ext/string.rb | 1 + lib/rake/file_creation_task.rb | 1 + lib/rake/file_list.rb | 1 + lib/rake/file_task.rb | 1 + lib/rake/file_utils.rb | 1 + lib/rake/file_utils_ext.rb | 1 + lib/rake/invocation_chain.rb | 1 + lib/rake/invocation_exception_mixin.rb | 1 + lib/rake/late_time.rb | 1 + lib/rake/linked_list.rb | 1 + lib/rake/loaders/makefile.rb | 1 + lib/rake/multi_task.rb | 1 + lib/rake/name_space.rb | 1 + lib/rake/packagetask.rb | 1 + lib/rake/phony.rb | 1 + lib/rake/private_reader.rb | 1 + lib/rake/promise.rb | 1 + lib/rake/pseudo_status.rb | 1 + lib/rake/rake_module.rb | 1 + lib/rake/rake_test_loader.rb | 1 + lib/rake/rule_recursion_overflow_error.rb | 1 + lib/rake/scope.rb | 1 + lib/rake/task.rb | 1 + lib/rake/task_argument_error.rb | 1 + lib/rake/task_arguments.rb | 1 + lib/rake/task_manager.rb | 1 + lib/rake/tasklib.rb | 1 + lib/rake/testtask.rb | 1 + lib/rake/thread_history_display.rb | 1 + lib/rake/thread_pool.rb | 1 + lib/rake/trace_output.rb | 1 + lib/rake/version.rb | 1 + lib/rake/win32.rb | 1 + test/helper.rb | 1 + test/support/file_creation.rb | 1 + test/support/rakefile_definitions.rb | 1 + test/support/ruby_runner.rb | 1 + test/test_private_reader.rb | 1 + test/test_rake.rb | 1 + test/test_rake_application.rb | 2 +- test/test_rake_application_options.rb | 1 + test/test_rake_backtrace.rb | 1 + test/test_rake_clean.rb | 1 + test/test_rake_cpu_counter.rb | 1 + test/test_rake_definitions.rb | 1 + test/test_rake_directory_task.rb | 1 + test/test_rake_dsl.rb | 1 + test/test_rake_early_time.rb | 1 + test/test_rake_extension.rb | 1 + test/test_rake_file_creation_task.rb | 1 + test/test_rake_file_list.rb | 1 + test/test_rake_file_list_path_map.rb | 1 + test/test_rake_file_task.rb | 1 + test/test_rake_file_utils.rb | 1 + test/test_rake_functional.rb | 1 + test/test_rake_invocation_chain.rb | 1 + test/test_rake_late_time.rb | 1 + test/test_rake_linked_list.rb | 1 + test/test_rake_makefile_loader.rb | 1 + test/test_rake_multi_task.rb | 1 + test/test_rake_name_space.rb | 1 + test/test_rake_package_task.rb | 1 + test/test_rake_path_map.rb | 1 + test/test_rake_path_map_explode.rb | 1 + test/test_rake_path_map_partial.rb | 1 + test/test_rake_pseudo_status.rb | 1 + test/test_rake_rake_test_loader.rb | 1 + test/test_rake_reduce_compat.rb | 1 + test/test_rake_require.rb | 1 + test/test_rake_rules.rb | 1 + test/test_rake_scope.rb | 1 + test/test_rake_task.rb | 1 + test/test_rake_task_argument_parsing.rb | 1 + test/test_rake_task_arguments.rb | 1 + test/test_rake_task_manager.rb | 1 + test/test_rake_task_manager_argument_resolution.rb | 1 + test/test_rake_task_with_arguments.rb | 1 + test/test_rake_test_task.rb | 1 + test/test_rake_thread_pool.rb | 1 + test/test_rake_top_level_functions.rb | 1 + test/test_rake_win32.rb | 1 + test/test_thread_history_display.rb | 1 + test/test_trace_output.rb | 1 + 94 files changed, 94 insertions(+), 1 deletion(-) diff --git a/doc/jamis.rb b/doc/jamis.rb index c7bc84ac5..6917016e4 100644 --- a/doc/jamis.rb +++ b/doc/jamis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module RDoc module Page diff --git a/lib/rake.rb b/lib/rake.rb index 07b03284b..68e6badf3 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false #-- # Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) # diff --git a/lib/rake/application.rb b/lib/rake/application.rb index e94f17290..576d0f278 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "optparse" require "rake/task_manager" diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index a89dd9f4d..b08c3e0c6 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake module Backtrace # :nodoc: all SYS_KEYS = RbConfig::CONFIG.keys.grep(/(?:[a-z]prefix|libdir)\z/) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index f66353a0a..92e2025e7 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # The 'rake/clean' file defines two file lists (CLEAN and CLOBBER) and # two rake tasks (:clean and :clobber). # diff --git a/lib/rake/cloneable.rb b/lib/rake/cloneable.rb index d53645f2f..37dd6d9e2 100644 --- a/lib/rake/cloneable.rb +++ b/lib/rake/cloneable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake ## # Mixin for creating easily cloned objects. diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 82a5eb8aa..369e1a41f 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Based on a script at: diff --git a/lib/rake/default_loader.rb b/lib/rake/default_loader.rb index 6154408f4..2d1115e20 100644 --- a/lib/rake/default_loader.rb +++ b/lib/rake/default_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Default Rakefile loader used by +import+. diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index c52bd601f..203dc0b17 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Rake DSL functions. require "rake/file_utils_ext" diff --git a/lib/rake/early_time.rb b/lib/rake/early_time.rb index abcb1872b..6c6919135 100644 --- a/lib/rake/early_time.rb +++ b/lib/rake/early_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # EarlyTime is a fake timestamp that occurs _before_ any other time value. diff --git a/lib/rake/ext/core.rb b/lib/rake/ext/core.rb index 7575df15a..82ad823bf 100644 --- a/lib/rake/ext/core.rb +++ b/lib/rake/ext/core.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false class Module # Check for an existing method in the current class before extending. If # the method already exists, then a warning is printed and the extension is diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 37764c845..1020de5f9 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/ext/core" class String diff --git a/lib/rake/file_creation_task.rb b/lib/rake/file_creation_task.rb index f3c5c78a1..a3bf78b0e 100644 --- a/lib/rake/file_creation_task.rb +++ b/lib/rake/file_creation_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/file_task" require "rake/early_time" diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index a30c6338c..6928333ff 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/cloneable" require "rake/file_utils_ext" require "rake/ext/string" diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index cbb978e7f..1f64530ff 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/task.rb" require "rake/early_time" diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 3e56710e2..764c10d29 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rbconfig" require "fileutils" diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb index e5930d4ab..b3ea9b9a4 100644 --- a/lib/rake/file_utils_ext.rb +++ b/lib/rake/file_utils_ext.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/file_utils" module Rake diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb index 540628957..84a19b1f5 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # InvocationChain tracks the chain of task invocations to detect diff --git a/lib/rake/invocation_exception_mixin.rb b/lib/rake/invocation_exception_mixin.rb index 84ff3353b..c252361b2 100644 --- a/lib/rake/invocation_exception_mixin.rb +++ b/lib/rake/invocation_exception_mixin.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake module InvocationExceptionMixin # Return the invocation chain (list of Rake tasks) that were in diff --git a/lib/rake/late_time.rb b/lib/rake/late_time.rb index d1d9470ec..39d00c10b 100644 --- a/lib/rake/late_time.rb +++ b/lib/rake/late_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # LateTime is a fake timestamp that occurs _after_ any other time value. class LateTime diff --git a/lib/rake/linked_list.rb b/lib/rake/linked_list.rb index 54d0c1287..32aa79bfd 100644 --- a/lib/rake/linked_list.rb +++ b/lib/rake/linked_list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Polylithic linked list structure used to implement several data diff --git a/lib/rake/loaders/makefile.rb b/lib/rake/loaders/makefile.rb index d0436bb79..f1be393d6 100644 --- a/lib/rake/loaders/makefile.rb +++ b/lib/rake/loaders/makefile.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Makefile loader to be used with the import file loader. Use this to diff --git a/lib/rake/multi_task.rb b/lib/rake/multi_task.rb index 7118dc411..60480b240 100644 --- a/lib/rake/multi_task.rb +++ b/lib/rake/multi_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Same as a regular task, but the immediate prerequisites are done in diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index 0d7eb80b6..39b376fd6 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false ## # The NameSpace class will lookup task names in the scope defined by a # +namespace+ command. diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index 034b8e9e8..b7c96b32b 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Define a package task library to aid in the definition of # redistributable package files. diff --git a/lib/rake/phony.rb b/lib/rake/phony.rb index a172f9c60..aac793a42 100644 --- a/lib/rake/phony.rb +++ b/lib/rake/phony.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false # Defines a :phony task that you can use as a dependency. This allows # file-based tasks to use non-file-based tasks as prerequisites # without forcing them to rebuild. diff --git a/lib/rake/private_reader.rb b/lib/rake/private_reader.rb index 162097857..121b105c1 100644 --- a/lib/rake/private_reader.rb +++ b/lib/rake/private_reader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Include PrivateReader to use +private_reader+. diff --git a/lib/rake/promise.rb b/lib/rake/promise.rb index 37221e427..c5f2b3f10 100644 --- a/lib/rake/promise.rb +++ b/lib/rake/promise.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # A Promise object represents a promise to do work (a chore) in the diff --git a/lib/rake/pseudo_status.rb b/lib/rake/pseudo_status.rb index 16e1903bd..f5f4fe991 100644 --- a/lib/rake/pseudo_status.rb +++ b/lib/rake/pseudo_status.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake ## diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index 75feb1261..bb97ec5cd 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/application" module Rake diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index 98dcced06..88b5cacdc 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake" # Load the test files from the command line. diff --git a/lib/rake/rule_recursion_overflow_error.rb b/lib/rake/rule_recursion_overflow_error.rb index 39d44aac6..7a5eab0ae 100644 --- a/lib/rake/rule_recursion_overflow_error.rb +++ b/lib/rake/rule_recursion_overflow_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Error indicating a recursion overflow error in task selection. diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb index b432f5f29..540219c7a 100644 --- a/lib/rake/scope.rb +++ b/lib/rake/scope.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake class Scope < LinkedList # :nodoc: all diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 23faf96e5..dc7066466 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/invocation_exception_mixin" module Rake diff --git a/lib/rake/task_argument_error.rb b/lib/rake/task_argument_error.rb index 3e1dda64d..277b8b9c7 100644 --- a/lib/rake/task_argument_error.rb +++ b/lib/rake/task_argument_error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # Error indicating an ill-formed task declaration. diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index c98057c8f..885d76909 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake ## diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 971984ca5..4e59b63f0 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake # The TaskManager module is a mixin for managing tasks. diff --git a/lib/rake/tasklib.rb b/lib/rake/tasklib.rb index 7bcda1789..7a25d0839 100644 --- a/lib/rake/tasklib.rb +++ b/lib/rake/tasklib.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake" module Rake diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index bb7f0ee8a..4986e0c9f 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake" require "rake/tasklib" diff --git a/lib/rake/thread_history_display.rb b/lib/rake/thread_history_display.rb index 04273541e..2d04e4c98 100644 --- a/lib/rake/thread_history_display.rb +++ b/lib/rake/thread_history_display.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rake/private_reader" module Rake diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 1c2f5f50f..43ac9f358 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "set" require "rake/promise" diff --git a/lib/rake/trace_output.rb b/lib/rake/trace_output.rb index c740b9e23..319ee4471 100644 --- a/lib/rake/trace_output.rb +++ b/lib/rake/trace_output.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake module TraceOutput # :nodoc: all diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 1908ff855..f9a0169df 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module Rake VERSION = "12.0.0" diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index 1fc02a5ae..94f6935d0 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rbconfig" module Rake diff --git a/test/helper.rb b/test/helper.rb index 532745319..0c3afc92d 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false $:.unshift File.expand_path("../../lib", __FILE__) require 'coveralls' diff --git a/test/support/file_creation.rb b/test/support/file_creation.rb index facc57a03..7631fa663 100644 --- a/test/support/file_creation.rb +++ b/test/support/file_creation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module FileCreation OLDFILE = "old" NEWFILE = "new" diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index 9a19d43fc..8632b8d7d 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module RakefileDefinitions include FileUtils diff --git a/test/support/ruby_runner.rb b/test/support/ruby_runner.rb index 199f60dd6..60d48abfe 100644 --- a/test/support/ruby_runner.rb +++ b/test/support/ruby_runner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module RubyRunner include FileUtils diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index 56160f062..7fdbf17b5 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/private_reader" diff --git a/test/test_rake.rb b/test/test_rake.rb index dfbb7d232..61fec24f7 100644 --- a/test/test_rake.rb +++ b/test/test_rake.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRake < Rake::TestCase diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index cd8feebbc..9dc140c3b 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,4 +1,4 @@ -#encoding: UTF-8 +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeApplication < Rake::TestCase diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 149d8dcfd..466bb2beb 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) TESTING_REQUIRE = [] diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index ec727a292..60aed4658 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "open3" diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 5439a415f..d4f0dae67 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/clean" diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index aac16b2d7..a55b5731d 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeCpuCounter < Rake::TestCase diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index 464cc6309..86517b1cd 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index e42bd9c77..3121f7b6e 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" require "pathname" diff --git a/test/test_rake_dsl.rb b/test/test_rake_dsl.rb index 7f82c6afa..d105c4755 100644 --- a/test/test_rake_dsl.rb +++ b/test/test_rake_dsl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeDsl < Rake::TestCase diff --git a/test/test_rake_early_time.rb b/test/test_rake_early_time.rb index 71ee3e157..39a9eadf3 100644 --- a/test/test_rake_early_time.rb +++ b/test/test_rake_early_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeEarlyTime < Rake::TestCase diff --git a/test/test_rake_extension.rb b/test/test_rake_extension.rb index 293ec1304..dafa291c1 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "stringio" diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index 35f843e9e..e4f1c1253 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 32ca7a8e3..f220e07f6 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "pathname" diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index 28953a97a..46f59273e 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeFileListPathMap < Rake::TestCase diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 24614dabe..74840d308 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" require "pathname" diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 00ef76e41..39d4dff61 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" require "stringio" diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index 3496bc12d..e6e010b5f 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" require "open3" diff --git a/test/test_rake_invocation_chain.rb b/test/test_rake_invocation_chain.rb index ba5f8724f..61eba3487 100644 --- a/test/test_rake_invocation_chain.rb +++ b/test/test_rake_invocation_chain.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeInvocationChain < Rake::TestCase diff --git a/test/test_rake_late_time.rb b/test/test_rake_late_time.rb index a88826da7..1641da61d 100644 --- a/test/test_rake_late_time.rb +++ b/test/test_rake_late_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeLateTime < Rake::TestCase diff --git a/test/test_rake_linked_list.rb b/test/test_rake_linked_list.rb index a3c4d1972..975befc73 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestLinkedList < Rake::TestCase diff --git a/test/test_rake_makefile_loader.rb b/test/test_rake_makefile_loader.rb index bd70fd3b6..42ce0f604 100644 --- a/test/test_rake_makefile_loader.rb +++ b/test/test_rake_makefile_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/loaders/makefile" diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index bab25b158..c614e15af 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "thread" diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index e043c07fa..274d71c4c 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeNameSpace < Rake::TestCase diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index 7bacb7a52..a3ce632ec 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/packagetask" diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index 040692930..1f20ad27b 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakePathMap < Rake::TestCase diff --git a/test/test_rake_path_map_explode.rb b/test/test_rake_path_map_explode.rb index 554a02266..18f85a11b 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakePathMapExplode < Rake::TestCase diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index 0adc24313..c62694545 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakePathMapPartial < Rake::TestCase diff --git a/test/test_rake_pseudo_status.rb b/test/test_rake_pseudo_status.rb index d9fe42216..9c8c3bee3 100644 --- a/test/test_rake_pseudo_status.rb +++ b/test/test_rake_pseudo_status.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakePseudoStatus < Rake::TestCase diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index 855606d4d..4c84c1bd8 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeRakeTestLoader < Rake::TestCase diff --git a/test/test_rake_reduce_compat.rb b/test/test_rake_reduce_compat.rb index de81b474b..71aeabd62 100644 --- a/test/test_rake_reduce_compat.rb +++ b/test/test_rake_reduce_compat.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "open3" diff --git a/test/test_rake_require.rb b/test/test_rake_require.rb index c77344cc3..8b8757f64 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeRequire < Rake::TestCase diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 35f0b45db..2e4f341e5 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_scope.rb b/test/test_rake_scope.rb index 169c0d9f9..54a32e07a 100644 --- a/test/test_rake_scope.rb +++ b/test/test_rake_scope.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeScope < Rake::TestCase diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index 5f5a63e30..b1952db1f 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index 4bc0ff0ae..684de7e27 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskArgumentParsing < Rake::TestCase diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 383d4a172..77d5deb05 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskArguments < Rake::TestCase diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index a611bd737..d7b3ae669 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskManager < Rake::TestCase diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index 6d292816d..ee0b77f9a 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskManagerArgumentResolution < Rake::TestCase diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 5f71b6b1a..cf359daca 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTaskWithArguments < Rake::TestCase diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 8e422f164..76e69982d 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/testtask" diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index d365574ba..8314ac553 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/thread_pool" diff --git a/test/test_rake_top_level_functions.rb b/test/test_rake_top_level_functions.rb index a3bb2fbb8..7082caad7 100644 --- a/test/test_rake_top_level_functions.rb +++ b/test/test_rake_top_level_functions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeTopLevelFunctions < Rake::TestCase diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index be95adb92..15f6663c9 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) class TestRakeWin32 < Rake::TestCase diff --git a/test/test_thread_history_display.rb b/test/test_thread_history_display.rb index f3466cef7..304471e71 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "rake/thread_history_display" diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index 18d2eee0f..a55296f7f 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require File.expand_path("../helper", __FILE__) require "stringio" From 68ef9140c11d083d8bb7ee5da5b0543e3a7df73d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Jun 2017 09:26:16 +0900 Subject: [PATCH 2/3] Specify frozen_string_literal: true --- doc/jamis.rb | 2 +- lib/rake.rb | 2 +- lib/rake/application.rb | 2 +- lib/rake/backtrace.rb | 2 +- lib/rake/clean.rb | 2 +- lib/rake/cloneable.rb | 2 +- lib/rake/cpu_counter.rb | 2 +- lib/rake/default_loader.rb | 2 +- lib/rake/dsl_definition.rb | 2 +- lib/rake/early_time.rb | 2 +- lib/rake/ext/core.rb | 2 +- lib/rake/ext/string.rb | 2 +- lib/rake/file_creation_task.rb | 2 +- lib/rake/file_list.rb | 2 +- lib/rake/file_task.rb | 2 +- lib/rake/file_utils.rb | 2 +- lib/rake/file_utils_ext.rb | 2 +- lib/rake/invocation_chain.rb | 2 +- lib/rake/invocation_exception_mixin.rb | 2 +- lib/rake/late_time.rb | 2 +- lib/rake/linked_list.rb | 2 +- lib/rake/loaders/makefile.rb | 2 +- lib/rake/multi_task.rb | 2 +- lib/rake/name_space.rb | 2 +- lib/rake/packagetask.rb | 2 +- lib/rake/phony.rb | 2 +- lib/rake/private_reader.rb | 2 +- lib/rake/promise.rb | 2 +- lib/rake/pseudo_status.rb | 2 +- lib/rake/rake_module.rb | 2 +- lib/rake/rake_test_loader.rb | 2 +- lib/rake/rule_recursion_overflow_error.rb | 2 +- lib/rake/scope.rb | 2 +- lib/rake/task.rb | 2 +- lib/rake/task_argument_error.rb | 2 +- lib/rake/task_arguments.rb | 2 +- lib/rake/task_manager.rb | 2 +- lib/rake/tasklib.rb | 2 +- lib/rake/testtask.rb | 2 +- lib/rake/thread_history_display.rb | 2 +- lib/rake/thread_pool.rb | 2 +- lib/rake/trace_output.rb | 2 +- lib/rake/version.rb | 2 +- lib/rake/win32.rb | 2 +- test/helper.rb | 2 +- test/support/file_creation.rb | 2 +- test/support/rakefile_definitions.rb | 2 +- test/support/ruby_runner.rb | 2 +- test/test_private_reader.rb | 2 +- test/test_rake.rb | 2 +- test/test_rake_application.rb | 2 +- test/test_rake_application_options.rb | 2 +- test/test_rake_backtrace.rb | 2 +- test/test_rake_clean.rb | 2 +- test/test_rake_cpu_counter.rb | 2 +- test/test_rake_definitions.rb | 2 +- test/test_rake_directory_task.rb | 2 +- test/test_rake_dsl.rb | 2 +- test/test_rake_early_time.rb | 2 +- test/test_rake_extension.rb | 2 +- test/test_rake_file_creation_task.rb | 2 +- test/test_rake_file_list.rb | 2 +- test/test_rake_file_list_path_map.rb | 2 +- test/test_rake_file_task.rb | 2 +- test/test_rake_file_utils.rb | 2 +- test/test_rake_functional.rb | 2 +- test/test_rake_invocation_chain.rb | 2 +- test/test_rake_late_time.rb | 2 +- test/test_rake_linked_list.rb | 2 +- test/test_rake_makefile_loader.rb | 2 +- test/test_rake_multi_task.rb | 2 +- test/test_rake_name_space.rb | 2 +- test/test_rake_package_task.rb | 2 +- test/test_rake_path_map.rb | 2 +- test/test_rake_path_map_explode.rb | 2 +- test/test_rake_path_map_partial.rb | 2 +- test/test_rake_pseudo_status.rb | 2 +- test/test_rake_rake_test_loader.rb | 2 +- test/test_rake_reduce_compat.rb | 2 +- test/test_rake_require.rb | 2 +- test/test_rake_rules.rb | 2 +- test/test_rake_scope.rb | 2 +- test/test_rake_task.rb | 2 +- test/test_rake_task_argument_parsing.rb | 2 +- test/test_rake_task_arguments.rb | 2 +- test/test_rake_task_manager.rb | 2 +- test/test_rake_task_manager_argument_resolution.rb | 2 +- test/test_rake_task_with_arguments.rb | 2 +- test/test_rake_test_task.rb | 2 +- test/test_rake_thread_pool.rb | 2 +- test/test_rake_top_level_functions.rb | 2 +- test/test_rake_win32.rb | 2 +- test/test_thread_history_display.rb | 2 +- test/test_trace_output.rb | 2 +- 94 files changed, 94 insertions(+), 94 deletions(-) diff --git a/doc/jamis.rb b/doc/jamis.rb index 6917016e4..531aa7573 100644 --- a/doc/jamis.rb +++ b/doc/jamis.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module RDoc module Page diff --git a/lib/rake.rb b/lib/rake.rb index 68e6badf3..0dfd05315 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) # diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 576d0f278..ae594e098 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "optparse" require "rake/task_manager" diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index b08c3e0c6..31ff05450 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake module Backtrace # :nodoc: all SYS_KEYS = RbConfig::CONFIG.keys.grep(/(?:[a-z]prefix|libdir)\z/) diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index 92e2025e7..5af44015e 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # The 'rake/clean' file defines two file lists (CLEAN and CLOBBER) and # two rake tasks (:clean and :clobber). # diff --git a/lib/rake/cloneable.rb b/lib/rake/cloneable.rb index 37dd6d9e2..eddb77e2f 100644 --- a/lib/rake/cloneable.rb +++ b/lib/rake/cloneable.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake ## # Mixin for creating easily cloned objects. diff --git a/lib/rake/cpu_counter.rb b/lib/rake/cpu_counter.rb index 369e1a41f..f3bf6d630 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Based on a script at: diff --git a/lib/rake/default_loader.rb b/lib/rake/default_loader.rb index 2d1115e20..d3b4650d3 100644 --- a/lib/rake/default_loader.rb +++ b/lib/rake/default_loader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Default Rakefile loader used by +import+. diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 203dc0b17..3962c1679 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # Rake DSL functions. require "rake/file_utils_ext" diff --git a/lib/rake/early_time.rb b/lib/rake/early_time.rb index 6c6919135..80cc6bfad 100644 --- a/lib/rake/early_time.rb +++ b/lib/rake/early_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # EarlyTime is a fake timestamp that occurs _before_ any other time value. diff --git a/lib/rake/ext/core.rb b/lib/rake/ext/core.rb index 82ad823bf..226f2125b 100644 --- a/lib/rake/ext/core.rb +++ b/lib/rake/ext/core.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true class Module # Check for an existing method in the current class before extending. If # the method already exists, then a warning is printed and the extension is diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 1020de5f9..7bd5064f9 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/ext/core" class String diff --git a/lib/rake/file_creation_task.rb b/lib/rake/file_creation_task.rb index a3bf78b0e..2eb251bf1 100644 --- a/lib/rake/file_creation_task.rb +++ b/lib/rake/file_creation_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/file_task" require "rake/early_time" diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index 6928333ff..748d668f1 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/cloneable" require "rake/file_utils_ext" require "rake/ext/string" diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index 1f64530ff..474b7bd93 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/task.rb" require "rake/early_time" diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 764c10d29..3439befab 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rbconfig" require "fileutils" diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb index b3ea9b9a4..bf558b749 100644 --- a/lib/rake/file_utils_ext.rb +++ b/lib/rake/file_utils_ext.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/file_utils" module Rake diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb index 84a19b1f5..44a995496 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # InvocationChain tracks the chain of task invocations to detect diff --git a/lib/rake/invocation_exception_mixin.rb b/lib/rake/invocation_exception_mixin.rb index c252361b2..b0d307a48 100644 --- a/lib/rake/invocation_exception_mixin.rb +++ b/lib/rake/invocation_exception_mixin.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake module InvocationExceptionMixin # Return the invocation chain (list of Rake tasks) that were in diff --git a/lib/rake/late_time.rb b/lib/rake/late_time.rb index 39d00c10b..8fe024943 100644 --- a/lib/rake/late_time.rb +++ b/lib/rake/late_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # LateTime is a fake timestamp that occurs _after_ any other time value. class LateTime diff --git a/lib/rake/linked_list.rb b/lib/rake/linked_list.rb index 32aa79bfd..11fa46f0d 100644 --- a/lib/rake/linked_list.rb +++ b/lib/rake/linked_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Polylithic linked list structure used to implement several data diff --git a/lib/rake/loaders/makefile.rb b/lib/rake/loaders/makefile.rb index f1be393d6..46f4beaad 100644 --- a/lib/rake/loaders/makefile.rb +++ b/lib/rake/loaders/makefile.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Makefile loader to be used with the import file loader. Use this to diff --git a/lib/rake/multi_task.rb b/lib/rake/multi_task.rb index 60480b240..04c9f3109 100644 --- a/lib/rake/multi_task.rb +++ b/lib/rake/multi_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Same as a regular task, but the immediate prerequisites are done in diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index 39b376fd6..32f8139fc 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true ## # The NameSpace class will lookup task names in the scope defined by a # +namespace+ command. diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index b7c96b32b..f65affa6d 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # Define a package task library to aid in the definition of # redistributable package files. diff --git a/lib/rake/phony.rb b/lib/rake/phony.rb index aac793a42..8caa5de17 100644 --- a/lib/rake/phony.rb +++ b/lib/rake/phony.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # Defines a :phony task that you can use as a dependency. This allows # file-based tasks to use non-file-based tasks as prerequisites # without forcing them to rebuild. diff --git a/lib/rake/private_reader.rb b/lib/rake/private_reader.rb index 121b105c1..2815ce643 100644 --- a/lib/rake/private_reader.rb +++ b/lib/rake/private_reader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Include PrivateReader to use +private_reader+. diff --git a/lib/rake/promise.rb b/lib/rake/promise.rb index c5f2b3f10..ecff4321e 100644 --- a/lib/rake/promise.rb +++ b/lib/rake/promise.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # A Promise object represents a promise to do work (a chore) in the diff --git a/lib/rake/pseudo_status.rb b/lib/rake/pseudo_status.rb index f5f4fe991..8b3c98949 100644 --- a/lib/rake/pseudo_status.rb +++ b/lib/rake/pseudo_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake ## diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index bb97ec5cd..f5cfde58a 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/application" module Rake diff --git a/lib/rake/rake_test_loader.rb b/lib/rake/rake_test_loader.rb index 88b5cacdc..ce3dd8eb6 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake" # Load the test files from the command line. diff --git a/lib/rake/rule_recursion_overflow_error.rb b/lib/rake/rule_recursion_overflow_error.rb index 7a5eab0ae..a51e77489 100644 --- a/lib/rake/rule_recursion_overflow_error.rb +++ b/lib/rake/rule_recursion_overflow_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Error indicating a recursion overflow error in task selection. diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb index 540219c7a..27c05da89 100644 --- a/lib/rake/scope.rb +++ b/lib/rake/scope.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake class Scope < LinkedList # :nodoc: all diff --git a/lib/rake/task.rb b/lib/rake/task.rb index dc7066466..077f37f4a 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/invocation_exception_mixin" module Rake diff --git a/lib/rake/task_argument_error.rb b/lib/rake/task_argument_error.rb index 277b8b9c7..ef20076c6 100644 --- a/lib/rake/task_argument_error.rb +++ b/lib/rake/task_argument_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # Error indicating an ill-formed task declaration. diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 885d76909..0d3001afd 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake ## diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 4e59b63f0..8bc7d42a4 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake # The TaskManager module is a mixin for managing tasks. diff --git a/lib/rake/tasklib.rb b/lib/rake/tasklib.rb index 7a25d0839..5354b4f94 100644 --- a/lib/rake/tasklib.rb +++ b/lib/rake/tasklib.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake" module Rake diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 4986e0c9f..66e114762 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake" require "rake/tasklib" diff --git a/lib/rake/thread_history_display.rb b/lib/rake/thread_history_display.rb index 2d04e4c98..412ea37be 100644 --- a/lib/rake/thread_history_display.rb +++ b/lib/rake/thread_history_display.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rake/private_reader" module Rake diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 43ac9f358..b01a5efe0 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "set" require "rake/promise" diff --git a/lib/rake/trace_output.rb b/lib/rake/trace_output.rb index 319ee4471..d713a0926 100644 --- a/lib/rake/trace_output.rb +++ b/lib/rake/trace_output.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake module TraceOutput # :nodoc: all diff --git a/lib/rake/version.rb b/lib/rake/version.rb index f9a0169df..a240aa5a4 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module Rake VERSION = "12.0.0" diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index 94f6935d0..6e6203181 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require "rbconfig" module Rake diff --git a/test/helper.rb b/test/helper.rb index 0c3afc92d..a6e38cb18 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true $:.unshift File.expand_path("../../lib", __FILE__) require 'coveralls' diff --git a/test/support/file_creation.rb b/test/support/file_creation.rb index 7631fa663..a1313bc0e 100644 --- a/test/support/file_creation.rb +++ b/test/support/file_creation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module FileCreation OLDFILE = "old" NEWFILE = "new" diff --git a/test/support/rakefile_definitions.rb b/test/support/rakefile_definitions.rb index 8632b8d7d..5dacd3783 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module RakefileDefinitions include FileUtils diff --git a/test/support/ruby_runner.rb b/test/support/ruby_runner.rb index 60d48abfe..160a57090 100644 --- a/test/support/ruby_runner.rb +++ b/test/support/ruby_runner.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true module RubyRunner include FileUtils diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index 7fdbf17b5..ef08c9d2c 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/private_reader" diff --git a/test/test_rake.rb b/test/test_rake.rb index 61fec24f7..2cdab492b 100644 --- a/test/test_rake.rb +++ b/test/test_rake.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRake < Rake::TestCase diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index 9dc140c3b..b52c484dc 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeApplication < Rake::TestCase diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index 466bb2beb..b34c2f634 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) TESTING_REQUIRE = [] diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index 60aed4658..d89817a11 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "open3" diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index d4f0dae67..612bd2546 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/clean" diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index a55b5731d..3c3af15bf 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeCpuCounter < Rake::TestCase diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index 86517b1cd..2dee13a34 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index 3121f7b6e..d5fd26f27 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" require "pathname" diff --git a/test/test_rake_dsl.rb b/test/test_rake_dsl.rb index d105c4755..162961446 100644 --- a/test/test_rake_dsl.rb +++ b/test/test_rake_dsl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeDsl < Rake::TestCase diff --git a/test/test_rake_early_time.rb b/test/test_rake_early_time.rb index 39a9eadf3..dc0550b2a 100644 --- a/test/test_rake_early_time.rb +++ b/test/test_rake_early_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeEarlyTime < Rake::TestCase diff --git a/test/test_rake_extension.rb b/test/test_rake_extension.rb index dafa291c1..0627ef9b7 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "stringio" diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index e4f1c1253..246f679c7 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index f220e07f6..7e5d1eed0 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "pathname" diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index 46f59273e..71402cf36 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeFileListPathMap < Rake::TestCase diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 74840d308..774cbafd4 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" require "pathname" diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 39d4dff61..bfdaf75bd 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" require "stringio" diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index e6e010b5f..daf832254 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" require "open3" diff --git a/test/test_rake_invocation_chain.rb b/test/test_rake_invocation_chain.rb index 61eba3487..338180aaa 100644 --- a/test/test_rake_invocation_chain.rb +++ b/test/test_rake_invocation_chain.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeInvocationChain < Rake::TestCase diff --git a/test/test_rake_late_time.rb b/test/test_rake_late_time.rb index 1641da61d..d07b441a0 100644 --- a/test/test_rake_late_time.rb +++ b/test/test_rake_late_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeLateTime < Rake::TestCase diff --git a/test/test_rake_linked_list.rb b/test/test_rake_linked_list.rb index 975befc73..d111575b2 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestLinkedList < Rake::TestCase diff --git a/test/test_rake_makefile_loader.rb b/test/test_rake_makefile_loader.rb index 42ce0f604..75713cd2f 100644 --- a/test/test_rake_makefile_loader.rb +++ b/test/test_rake_makefile_loader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/loaders/makefile" diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index c614e15af..8a50c2980 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "thread" diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index 274d71c4c..e8d4d6b20 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeNameSpace < Rake::TestCase diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index a3ce632ec..2634267ee 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/packagetask" diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index 1f20ad27b..92cf337cb 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakePathMap < Rake::TestCase diff --git a/test/test_rake_path_map_explode.rb b/test/test_rake_path_map_explode.rb index 18f85a11b..3174d6ccc 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakePathMapExplode < Rake::TestCase diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index c62694545..f65428d71 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakePathMapPartial < Rake::TestCase diff --git a/test/test_rake_pseudo_status.rb b/test/test_rake_pseudo_status.rb index 9c8c3bee3..5a54bc200 100644 --- a/test/test_rake_pseudo_status.rb +++ b/test/test_rake_pseudo_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakePseudoStatus < Rake::TestCase diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index 4c84c1bd8..fa35c44aa 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeRakeTestLoader < Rake::TestCase diff --git a/test/test_rake_reduce_compat.rb b/test/test_rake_reduce_compat.rb index 71aeabd62..f3db9a79c 100644 --- a/test/test_rake_reduce_compat.rb +++ b/test/test_rake_reduce_compat.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "open3" diff --git a/test/test_rake_require.rb b/test/test_rake_require.rb index 8b8757f64..899aba5ca 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeRequire < Rake::TestCase diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 2e4f341e5..e71af3502 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_scope.rb b/test/test_rake_scope.rb index 54a32e07a..50bb1810b 100644 --- a/test/test_rake_scope.rb +++ b/test/test_rake_scope.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeScope < Rake::TestCase diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index b1952db1f..b2bbb6d95 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "fileutils" diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index 684de7e27..e34126591 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskArgumentParsing < Rake::TestCase diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 77d5deb05..2ae3652da 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskArguments < Rake::TestCase diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index d7b3ae669..a9157ed81 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskManager < Rake::TestCase diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index ee0b77f9a..c07be6f5e 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskManagerArgumentResolution < Rake::TestCase diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index cf359daca..b7a9e03e7 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTaskWithArguments < Rake::TestCase diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 76e69982d..396e05924 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/testtask" diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index 8314ac553..ceb8a5d1b 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/thread_pool" diff --git a/test/test_rake_top_level_functions.rb b/test/test_rake_top_level_functions.rb index 7082caad7..f3675a096 100644 --- a/test/test_rake_top_level_functions.rb +++ b/test/test_rake_top_level_functions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeTopLevelFunctions < Rake::TestCase diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index 15f6663c9..292af4715 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeWin32 < Rake::TestCase diff --git a/test/test_thread_history_display.rb b/test/test_thread_history_display.rb index 304471e71..8adb1940a 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "rake/thread_history_display" diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index a55296f7f..92de3058b 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "stringio" From 23f779f73afb4ef9be9f50774bfb6da03f38c0ec Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 20 Jun 2017 10:19:07 +0900 Subject: [PATCH 3/3] Fixed broken test with frozen objects --- lib/rake/ext/string.rb | 2 +- lib/rake/task.rb | 2 +- test/test_rake_application.rb | 2 +- test/test_rake_path_map_partial.rb | 2 +- test/test_trace_output.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 7bd5064f9..c70236ae9 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -137,7 +137,7 @@ def pathmap_replace(patterns, &block) # This String extension comes from Rake def pathmap(spec=nil, &block) return self if spec.nil? - result = "" + result = "".dup spec.scan(/%\{[^}]*\}-?\d*[sdpfnxX%]|%-?\d+d|%.|[^%]+/) do |frag| case frag when "%f" diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 077f37f4a..256571112 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -321,7 +321,7 @@ def set_arg_names(args) # Return a string describing the internal state of a task. Useful for # debugging. def investigation - result = "------------------------------\n" + result = "------------------------------\n".dup result << "Investigating #{name}\n" result << "class: #{self.class}\n" result << "task needed: #{needed?}\n" diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index b52c484dc..141dd576f 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -37,7 +37,7 @@ def test_display_exception_details def test_display_exception_details_bad_encoding begin - raise "El Niño is coming!".force_encoding("US-ASCII") + raise "El Niño is coming!".dup.force_encoding("US-ASCII") rescue => ex end diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index f65428d71..9daf44ca5 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -3,7 +3,7 @@ class TestRakePathMapPartial < Rake::TestCase def test_pathmap_partial - @path = "1/2/file" + @path = "1/2/file".dup def @path.call(n) pathmap_partial(n) end diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index 92de3058b..34dab6162 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -9,7 +9,7 @@ class PrintSpy attr_reader :result, :calls def initialize - @result = "" + @result = "".dup @calls = 0 end