summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/lib/envutil.rb4
-rw-r--r--test/lib/find_executable.rb2
-rw-r--r--test/lib/iseq_loader_checker.rb2
-rw-r--r--test/lib/leakchecker.rb2
-rw-r--r--test/lib/memory_status.rb2
-rw-r--r--test/lib/minitest/autorun.rb2
-rw-r--r--test/lib/minitest/benchmark.rb2
-rw-r--r--test/lib/minitest/mock.rb2
-rw-r--r--test/lib/minitest/unit.rb2
-rw-r--r--test/lib/profile_test_all.rb2
-rw-r--r--test/lib/test/unit.rb2
-rw-r--r--test/lib/test/unit/assertions.rb8
-rw-r--r--test/lib/test/unit/parallel.rb2
-rw-r--r--test/lib/test/unit/testcase.rb2
-rw-r--r--test/lib/tracepointchecker.rb2
-rw-r--r--test/lib/with_different_ofs.rb2
-rw-r--r--test/lib/zombie_hunter.rb2
17 files changed, 21 insertions, 21 deletions
diff --git a/test/lib/envutil.rb b/test/lib/envutil.rb
index dac59bd9846..e2eefbe917b 100644
--- a/test/lib/envutil.rb
+++ b/test/lib/envutil.rb
@@ -1,5 +1,5 @@
# -*- coding: us-ascii -*-
-# frozen_string_literal: false
+# frozen_string_literal: true
require "open3"
require "timeout"
require_relative "find_executable"
@@ -159,7 +159,7 @@ module EnvUtil
end
def verbose_warning
- class << (stderr = "")
+ class << (stderr = "".dup)
alias write <<
end
stderr, $stderr, verbose, $VERBOSE = $stderr, stderr, $VERBOSE, true
diff --git a/test/lib/find_executable.rb b/test/lib/find_executable.rb
index 0ddd307f8cc..89c6fb8f3b7 100644
--- a/test/lib/find_executable.rb
+++ b/test/lib/find_executable.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require "rbconfig"
module EnvUtil
diff --git a/test/lib/iseq_loader_checker.rb b/test/lib/iseq_loader_checker.rb
index f3685518836..1a1a694834d 100644
--- a/test/lib/iseq_loader_checker.rb
+++ b/test/lib/iseq_loader_checker.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
begin
require '-test-/iseq_load/iseq_load'
diff --git a/test/lib/leakchecker.rb b/test/lib/leakchecker.rb
index c0cf7186352..336809bc405 100644
--- a/test/lib/leakchecker.rb
+++ b/test/lib/leakchecker.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
class LeakChecker
def initialize
@fd_info = find_fds
diff --git a/test/lib/memory_status.rb b/test/lib/memory_status.rb
index 0f6d4db91ba..ad002b2dda5 100644
--- a/test/lib/memory_status.rb
+++ b/test/lib/memory_status.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
begin
require '-test-/memory_status.so'
rescue LoadError
diff --git a/test/lib/minitest/autorun.rb b/test/lib/minitest/autorun.rb
index 40640b2580d..844096623c0 100644
--- a/test/lib/minitest/autorun.rb
+++ b/test/lib/minitest/autorun.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
-# frozen_string_literal: false
+# frozen_string_literal: true
begin
require 'rubygems'
diff --git a/test/lib/minitest/benchmark.rb b/test/lib/minitest/benchmark.rb
index 21f0b29d509..b3f2bc28b30 100644
--- a/test/lib/minitest/benchmark.rb
+++ b/test/lib/minitest/benchmark.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'minitest/unit'
diff --git a/test/lib/minitest/mock.rb b/test/lib/minitest/mock.rb
index 07e88113ea6..224b06cb89f 100644
--- a/test/lib/minitest/mock.rb
+++ b/test/lib/minitest/mock.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
-# frozen_string_literal: false
+# frozen_string_literal: true
class MockExpectationError < StandardError; end # :nodoc:
diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb
index b7dd183d20b..89b6a8eaf4e 100644
--- a/test/lib/minitest/unit.rb
+++ b/test/lib/minitest/unit.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
-# frozen_string_literal: false
+# frozen_string_literal: true
require "optparse"
require "rbconfig"
diff --git a/test/lib/profile_test_all.rb b/test/lib/profile_test_all.rb
index 4496d3f780b..4771b72afb1 100644
--- a/test/lib/profile_test_all.rb
+++ b/test/lib/profile_test_all.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#
# purpose:
# Profile memory usage of each tests.
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb
index c6983d0a6af..c280c68581f 100644
--- a/test/lib/test/unit.rb
+++ b/test/lib/test/unit.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
begin
gem 'minitest', '< 5.0.0' if defined? Gem
rescue Gem::LoadError
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index 34dbe18738a..e0ac732fcdb 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'minitest/unit'
require 'pp'
@@ -452,7 +452,7 @@ EOT
ms = instance_methods(true).map {|sym| sym.to_s }
ms.grep(/\Arefute_/) do |m|
- mname = ('assert_not_' << m.to_s[/.*?_(.*)/, 1])
+ mname = ('assert_not_'.dup << m.to_s[/.*?_(.*)/, 1])
alias_method(mname, m) unless ms.include? mname
end
alias assert_include assert_includes
@@ -543,7 +543,7 @@ EOT
if status.coredump?
sigdesc << " (core dumped)"
end
- full_message = ''
+ full_message = ''.dup
message = message.call if Proc === message
if message and !message.empty?
full_message << message << "\n"
@@ -828,7 +828,7 @@ eom
end
result = File.__send__(predicate, *args)
result = !result if neg
- mesg = "Expected file " << args.shift.inspect
+ mesg = "Expected file ".dup << args.shift.inspect
mesg << "#{neg} to be #{predicate}"
mesg << mu_pp(args).sub(/\A\[(.*)\]\z/m, '(\1)') unless args.empty?
mesg << " #{failure_message}" if failure_message
diff --git a/test/lib/test/unit/parallel.rb b/test/lib/test/unit/parallel.rb
index a71db5f56ae..d851326acab 100644
--- a/test/lib/test/unit/parallel.rb
+++ b/test/lib/test/unit/parallel.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../.."
require 'test/unit'
diff --git a/test/lib/test/unit/testcase.rb b/test/lib/test/unit/testcase.rb
index 10348b5c9b4..58cfbcab99e 100644
--- a/test/lib/test/unit/testcase.rb
+++ b/test/lib/test/unit/testcase.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'test/unit/assertions'
module Test
diff --git a/test/lib/tracepointchecker.rb b/test/lib/tracepointchecker.rb
index 73631d415ee..447a63bc1ee 100644
--- a/test/lib/tracepointchecker.rb
+++ b/test/lib/tracepointchecker.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
module TracePointChecker
STATE = {
count: 0,
diff --git a/test/lib/with_different_ofs.rb b/test/lib/with_different_ofs.rb
index 164914f1d6c..b7ac646f8fe 100644
--- a/test/lib/with_different_ofs.rb
+++ b/test/lib/with_different_ofs.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
module DifferentOFS
module WithDifferentOFS
def setup
diff --git a/test/lib/zombie_hunter.rb b/test/lib/zombie_hunter.rb
index 8a8fba649cf..2b81e396aca 100644
--- a/test/lib/zombie_hunter.rb
+++ b/test/lib/zombie_hunter.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
module ZombieHunter
def after_teardown
super