1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Specify frozen_string_literal: true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2017-06-20 11:10:37 +00:00
parent b589c47806
commit d5f86e836f
17 changed files with 21 additions and 21 deletions

View file

@ -1,5 +1,5 @@
# -*- coding: us-ascii -*- # -*- coding: us-ascii -*-
# frozen_string_literal: false # frozen_string_literal: true
require "open3" require "open3"
require "timeout" require "timeout"
require_relative "find_executable" require_relative "find_executable"
@ -159,7 +159,7 @@ module EnvUtil
end end
def verbose_warning def verbose_warning
class << (stderr = "") class << (stderr = "".dup)
alias write << alias write <<
end end
stderr, $stderr, verbose, $VERBOSE = $stderr, stderr, $VERBOSE, true stderr, $stderr, verbose, $VERBOSE = $stderr, stderr, $VERBOSE, true

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
require "rbconfig" require "rbconfig"
module EnvUtil module EnvUtil

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
begin begin
require '-test-/iseq_load/iseq_load' require '-test-/iseq_load/iseq_load'

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
class LeakChecker class LeakChecker
def initialize def initialize
@fd_info = find_fds @fd_info = find_fds

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
begin begin
require '-test-/memory_status.so' require '-test-/memory_status.so'
rescue LoadError rescue LoadError

View file

@ -1,5 +1,5 @@
# encoding: utf-8 # encoding: utf-8
# frozen_string_literal: false # frozen_string_literal: true
begin begin
require 'rubygems' require 'rubygems'

View file

@ -1,5 +1,5 @@
# encoding: utf-8 # encoding: utf-8
# frozen_string_literal: false # frozen_string_literal: true
require 'minitest/unit' require 'minitest/unit'

View file

@ -1,5 +1,5 @@
# encoding: utf-8 # encoding: utf-8
# frozen_string_literal: false # frozen_string_literal: true
class MockExpectationError < StandardError; end # :nodoc: class MockExpectationError < StandardError; end # :nodoc:

View file

@ -1,5 +1,5 @@
# encoding: utf-8 # encoding: utf-8
# frozen_string_literal: false # frozen_string_literal: true
require "optparse" require "optparse"
require "rbconfig" require "rbconfig"

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
# #
# purpose: # purpose:
# Profile memory usage of each tests. # Profile memory usage of each tests.

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
begin begin
gem 'minitest', '< 5.0.0' if defined? Gem gem 'minitest', '< 5.0.0' if defined? Gem
rescue Gem::LoadError rescue Gem::LoadError

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
require 'minitest/unit' require 'minitest/unit'
require 'pp' require 'pp'
@ -452,7 +452,7 @@ EOT
ms = instance_methods(true).map {|sym| sym.to_s } ms = instance_methods(true).map {|sym| sym.to_s }
ms.grep(/\Arefute_/) do |m| 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 alias_method(mname, m) unless ms.include? mname
end end
alias assert_include assert_includes alias assert_include assert_includes
@ -543,7 +543,7 @@ EOT
if status.coredump? if status.coredump?
sigdesc << " (core dumped)" sigdesc << " (core dumped)"
end end
full_message = '' full_message = ''.dup
message = message.call if Proc === message message = message.call if Proc === message
if message and !message.empty? if message and !message.empty?
full_message << message << "\n" full_message << message << "\n"
@ -828,7 +828,7 @@ eom
end end
result = File.__send__(predicate, *args) result = File.__send__(predicate, *args)
result = !result if neg result = !result if neg
mesg = "Expected file " << args.shift.inspect mesg = "Expected file ".dup << args.shift.inspect
mesg << "#{neg} to be #{predicate}" mesg << "#{neg} to be #{predicate}"
mesg << mu_pp(args).sub(/\A\[(.*)\]\z/m, '(\1)') unless args.empty? mesg << mu_pp(args).sub(/\A\[(.*)\]\z/m, '(\1)') unless args.empty?
mesg << " #{failure_message}" if failure_message mesg << " #{failure_message}" if failure_message

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../.." $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../.."
require 'test/unit' require 'test/unit'

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
require 'test/unit/assertions' require 'test/unit/assertions'
module Test module Test

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
module TracePointChecker module TracePointChecker
STATE = { STATE = {
count: 0, count: 0,

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
module DifferentOFS module DifferentOFS
module WithDifferentOFS module WithDifferentOFS
def setup def setup

View file

@ -1,4 +1,4 @@
# frozen_string_literal: false # frozen_string_literal: true
module ZombieHunter module ZombieHunter
def after_teardown def after_teardown
super super