summaryrefslogtreecommitdiff
path: root/test/lib/test
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-20 11:10:37 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-20 11:10:37 +0000
commitd5f86e836faa87cf75db2112538f53bdbe627a08 (patch)
treeabcef54b2b64aa9942debff27793a1ca194a1978 /test/lib/test
parentb589c478061811c4b4a439eba7fbe802e71119a4 (diff)
Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/test')
-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
4 files changed, 7 insertions, 7 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb
index c6983d0a6a..c280c68581 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 34dbe18738..e0ac732fcd 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 a71db5f56a..d851326aca 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 10348b5c9b..58cfbcab99 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