diff --git a/doc/jamis.rb b/doc/jamis.rb index c7bc84ac5..531aa7573 100644 --- a/doc/jamis.rb +++ b/doc/jamis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module RDoc module Page diff --git a/lib/rake.rb b/lib/rake.rb index 07b03284b..0dfd05315 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -1,3 +1,4 @@ +# 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 e94f17290..ae594e098 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "optparse" require "rake/task_manager" diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb index a89dd9f4d..31ff05450 100644 --- a/lib/rake/backtrace.rb +++ b/lib/rake/backtrace.rb @@ -1,3 +1,4 @@ +# 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 f66353a0a..5af44015e 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -1,3 +1,4 @@ +# 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 d53645f2f..eddb77e2f 100644 --- a/lib/rake/cloneable.rb +++ b/lib/rake/cloneable.rb @@ -1,3 +1,4 @@ +# 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 82a5eb8aa..f3bf6d630 100644 --- a/lib/rake/cpu_counter.rb +++ b/lib/rake/cpu_counter.rb @@ -1,3 +1,4 @@ +# 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 6154408f4..d3b4650d3 100644 --- a/lib/rake/default_loader.rb +++ b/lib/rake/default_loader.rb @@ -1,3 +1,4 @@ +# 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 c52bd601f..3962c1679 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -1,3 +1,4 @@ +# 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 abcb1872b..80cc6bfad 100644 --- a/lib/rake/early_time.rb +++ b/lib/rake/early_time.rb @@ -1,3 +1,4 @@ +# 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 7575df15a..226f2125b 100644 --- a/lib/rake/ext/core.rb +++ b/lib/rake/ext/core.rb @@ -1,3 +1,4 @@ +# 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 37764c845..c70236ae9 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/ext/core" class String @@ -136,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/file_creation_task.rb b/lib/rake/file_creation_task.rb index f3c5c78a1..2eb251bf1 100644 --- a/lib/rake/file_creation_task.rb +++ b/lib/rake/file_creation_task.rb @@ -1,3 +1,4 @@ +# 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 a30c6338c..748d668f1 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -1,3 +1,4 @@ +# 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 cbb978e7f..474b7bd93 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -1,3 +1,4 @@ +# 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 3e56710e2..3439befab 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -1,3 +1,4 @@ +# 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 e5930d4ab..bf558b749 100644 --- a/lib/rake/file_utils_ext.rb +++ b/lib/rake/file_utils_ext.rb @@ -1,3 +1,4 @@ +# 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 540628957..44a995496 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -1,3 +1,4 @@ +# 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 84ff3353b..b0d307a48 100644 --- a/lib/rake/invocation_exception_mixin.rb +++ b/lib/rake/invocation_exception_mixin.rb @@ -1,3 +1,4 @@ +# 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 d1d9470ec..8fe024943 100644 --- a/lib/rake/late_time.rb +++ b/lib/rake/late_time.rb @@ -1,3 +1,4 @@ +# 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 54d0c1287..11fa46f0d 100644 --- a/lib/rake/linked_list.rb +++ b/lib/rake/linked_list.rb @@ -1,3 +1,4 @@ +# 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 d0436bb79..46f4beaad 100644 --- a/lib/rake/loaders/makefile.rb +++ b/lib/rake/loaders/makefile.rb @@ -1,3 +1,4 @@ +# 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 7118dc411..04c9f3109 100644 --- a/lib/rake/multi_task.rb +++ b/lib/rake/multi_task.rb @@ -1,3 +1,4 @@ +# 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 0d7eb80b6..32f8139fc 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -1,3 +1,4 @@ +# 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 034b8e9e8..f65affa6d 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -1,3 +1,4 @@ +# 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 a172f9c60..8caa5de17 100644 --- a/lib/rake/phony.rb +++ b/lib/rake/phony.rb @@ -1,3 +1,4 @@ +# 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 162097857..2815ce643 100644 --- a/lib/rake/private_reader.rb +++ b/lib/rake/private_reader.rb @@ -1,3 +1,4 @@ +# 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 37221e427..ecff4321e 100644 --- a/lib/rake/promise.rb +++ b/lib/rake/promise.rb @@ -1,3 +1,4 @@ +# 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 16e1903bd..8b3c98949 100644 --- a/lib/rake/pseudo_status.rb +++ b/lib/rake/pseudo_status.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Rake ## diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb index 75feb1261..f5cfde58a 100644 --- a/lib/rake/rake_module.rb +++ b/lib/rake/rake_module.rb @@ -1,3 +1,4 @@ +# 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 98dcced06..ce3dd8eb6 100644 --- a/lib/rake/rake_test_loader.rb +++ b/lib/rake/rake_test_loader.rb @@ -1,3 +1,4 @@ +# 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 39d44aac6..a51e77489 100644 --- a/lib/rake/rule_recursion_overflow_error.rb +++ b/lib/rake/rule_recursion_overflow_error.rb @@ -1,3 +1,4 @@ +# 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 b432f5f29..27c05da89 100644 --- a/lib/rake/scope.rb +++ b/lib/rake/scope.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Rake class Scope < LinkedList # :nodoc: all diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 23faf96e5..256571112 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake/invocation_exception_mixin" module Rake @@ -320,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/lib/rake/task_argument_error.rb b/lib/rake/task_argument_error.rb index 3e1dda64d..ef20076c6 100644 --- a/lib/rake/task_argument_error.rb +++ b/lib/rake/task_argument_error.rb @@ -1,3 +1,4 @@ +# 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 c98057c8f..0d3001afd 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Rake ## diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 971984ca5..8bc7d42a4 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -1,3 +1,4 @@ +# 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 7bcda1789..5354b4f94 100644 --- a/lib/rake/tasklib.rb +++ b/lib/rake/tasklib.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rake" module Rake diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index bb7f0ee8a..66e114762 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -1,3 +1,4 @@ +# 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 04273541e..412ea37be 100644 --- a/lib/rake/thread_history_display.rb +++ b/lib/rake/thread_history_display.rb @@ -1,3 +1,4 @@ +# 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 1c2f5f50f..b01a5efe0 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" require "rake/promise" diff --git a/lib/rake/trace_output.rb b/lib/rake/trace_output.rb index c740b9e23..d713a0926 100644 --- a/lib/rake/trace_output.rb +++ b/lib/rake/trace_output.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Rake module TraceOutput # :nodoc: all diff --git a/lib/rake/version.rb b/lib/rake/version.rb index 1908ff855..a240aa5a4 100644 --- a/lib/rake/version.rb +++ b/lib/rake/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Rake VERSION = "12.0.0" diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb index 1fc02a5ae..6e6203181 100644 --- a/lib/rake/win32.rb +++ b/lib/rake/win32.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rbconfig" module Rake diff --git a/test/helper.rb b/test/helper.rb index 532745319..a6e38cb18 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,3 +1,4 @@ +# 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 facc57a03..a1313bc0e 100644 --- a/test/support/file_creation.rb +++ b/test/support/file_creation.rb @@ -1,3 +1,4 @@ +# 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 9a19d43fc..5dacd3783 100644 --- a/test/support/rakefile_definitions.rb +++ b/test/support/rakefile_definitions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module RakefileDefinitions include FileUtils diff --git a/test/support/ruby_runner.rb b/test/support/ruby_runner.rb index 199f60dd6..160a57090 100644 --- a/test/support/ruby_runner.rb +++ b/test/support/ruby_runner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module RubyRunner include FileUtils diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index 56160f062..ef08c9d2c 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -1,3 +1,4 @@ +# 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 dfbb7d232..2cdab492b 100644 --- a/test/test_rake.rb +++ b/test/test_rake.rb @@ -1,3 +1,4 @@ +# 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 cd8feebbc..141dd576f 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,4 +1,4 @@ -#encoding: UTF-8 +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) class TestRakeApplication < Rake::TestCase @@ -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_application_options.rb b/test/test_rake_application_options.rb index 149d8dcfd..b34c2f634 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -1,3 +1,4 @@ +# 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 ec727a292..d89817a11 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -1,3 +1,4 @@ +# 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 5439a415f..612bd2546 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -1,3 +1,4 @@ +# 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 aac16b2d7..3c3af15bf 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,3 +1,4 @@ +# 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 464cc6309..2dee13a34 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -1,3 +1,4 @@ +# 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 e42bd9c77..d5fd26f27 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -1,3 +1,4 @@ +# 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 7f82c6afa..162961446 100644 --- a/test/test_rake_dsl.rb +++ b/test/test_rake_dsl.rb @@ -1,3 +1,4 @@ +# 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 71ee3e157..dc0550b2a 100644 --- a/test/test_rake_early_time.rb +++ b/test/test_rake_early_time.rb @@ -1,3 +1,4 @@ +# 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 293ec1304..0627ef9b7 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -1,3 +1,4 @@ +# 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 35f843e9e..246f679c7 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -1,3 +1,4 @@ +# 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 32ca7a8e3..7e5d1eed0 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -1,3 +1,4 @@ +# 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 28953a97a..71402cf36 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: 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 24614dabe..774cbafd4 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -1,3 +1,4 @@ +# 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 00ef76e41..bfdaf75bd 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -1,3 +1,4 @@ +# 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 3496bc12d..daf832254 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -1,3 +1,4 @@ +# 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 ba5f8724f..338180aaa 100644 --- a/test/test_rake_invocation_chain.rb +++ b/test/test_rake_invocation_chain.rb @@ -1,3 +1,4 @@ +# 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 a88826da7..d07b441a0 100644 --- a/test/test_rake_late_time.rb +++ b/test/test_rake_late_time.rb @@ -1,3 +1,4 @@ +# 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 a3c4d1972..d111575b2 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -1,3 +1,4 @@ +# 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 bd70fd3b6..75713cd2f 100644 --- a/test/test_rake_makefile_loader.rb +++ b/test/test_rake_makefile_loader.rb @@ -1,3 +1,4 @@ +# 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 bab25b158..8a50c2980 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -1,3 +1,4 @@ +# 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 e043c07fa..e8d4d6b20 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -1,3 +1,4 @@ +# 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 7bacb7a52..2634267ee 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -1,3 +1,4 @@ +# 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 040692930..92cf337cb 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -1,3 +1,4 @@ +# 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 554a02266..3174d6ccc 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -1,3 +1,4 @@ +# 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 0adc24313..9daf44ca5 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -1,8 +1,9 @@ +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) 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_rake_pseudo_status.rb b/test/test_rake_pseudo_status.rb index d9fe42216..5a54bc200 100644 --- a/test/test_rake_pseudo_status.rb +++ b/test/test_rake_pseudo_status.rb @@ -1,3 +1,4 @@ +# 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 855606d4d..fa35c44aa 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -1,3 +1,4 @@ +# 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 de81b474b..f3db9a79c 100644 --- a/test/test_rake_reduce_compat.rb +++ b/test/test_rake_reduce_compat.rb @@ -1,3 +1,4 @@ +# 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 c77344cc3..899aba5ca 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,3 +1,4 @@ +# 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 35f0b45db..e71af3502 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -1,3 +1,4 @@ +# 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 169c0d9f9..50bb1810b 100644 --- a/test/test_rake_scope.rb +++ b/test/test_rake_scope.rb @@ -1,3 +1,4 @@ +# 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 5f5a63e30..b2bbb6d95 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -1,3 +1,4 @@ +# 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 4bc0ff0ae..e34126591 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -1,3 +1,4 @@ +# 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 383d4a172..2ae3652da 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,3 +1,4 @@ +# 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 a611bd737..a9157ed81 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -1,3 +1,4 @@ +# 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 6d292816d..c07be6f5e 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: 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 5f71b6b1a..b7a9e03e7 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -1,3 +1,4 @@ +# 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 8e422f164..396e05924 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -1,3 +1,4 @@ +# 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 d365574ba..ceb8a5d1b 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -1,3 +1,4 @@ +# 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 a3bb2fbb8..f3675a096 100644 --- a/test/test_rake_top_level_functions.rb +++ b/test/test_rake_top_level_functions.rb @@ -1,3 +1,4 @@ +# 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 be95adb92..292af4715 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -1,3 +1,4 @@ +# 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 f3466cef7..8adb1940a 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -1,3 +1,4 @@ +# 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 18d2eee0f..34dab6162 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require File.expand_path("../helper", __FILE__) require "stringio" @@ -8,7 +9,7 @@ class PrintSpy attr_reader :result, :calls def initialize - @result = "" + @result = "".dup @calls = 0 end