ruby-changes:47006
From: hsbt <ko1@a...>
Date: Tue, 20 Jun 2017 20:10:42 +0900 (JST)
Subject: [ruby-changes:47006] hsbt:r59121 (trunk): Specify frozen_string_literal: true.
hsbt 2017-06-20 20:10:37 +0900 (Tue, 20 Jun 2017) New Revision: 59121 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59121 Log: Specify frozen_string_literal: true. Modified files: trunk/test/lib/envutil.rb trunk/test/lib/find_executable.rb trunk/test/lib/iseq_loader_checker.rb trunk/test/lib/leakchecker.rb trunk/test/lib/memory_status.rb trunk/test/lib/minitest/autorun.rb trunk/test/lib/minitest/benchmark.rb trunk/test/lib/minitest/mock.rb trunk/test/lib/minitest/unit.rb trunk/test/lib/profile_test_all.rb trunk/test/lib/test/unit/assertions.rb trunk/test/lib/test/unit/parallel.rb trunk/test/lib/test/unit/testcase.rb trunk/test/lib/test/unit.rb trunk/test/lib/tracepointchecker.rb trunk/test/lib/with_different_ofs.rb trunk/test/lib/zombie_hunter.rb Index: test/lib/envutil.rb =================================================================== --- test/lib/envutil.rb (revision 59120) +++ test/lib/envutil.rb (revision 59121) @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L1 # -*- 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 https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L159 end def verbose_warning - class << (stderr = "") + class << (stderr = "".dup) alias write << end stderr, $stderr, verbose, $VERBOSE = $stderr, stderr, $VERBOSE, true Index: test/lib/profile_test_all.rb =================================================================== --- test/lib/profile_test_all.rb (revision 59120) +++ test/lib/profile_test_all.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/profile_test_all.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true # # purpose: # Profile memory usage of each tests. Index: test/lib/with_different_ofs.rb =================================================================== --- test/lib/with_different_ofs.rb (revision 59120) +++ test/lib/with_different_ofs.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/with_different_ofs.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true module DifferentOFS module WithDifferentOFS def setup Index: test/lib/minitest/mock.rb =================================================================== --- test/lib/minitest/mock.rb (revision 59120) +++ test/lib/minitest/mock.rb (revision 59121) @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/minitest/mock.rb#L1 # encoding: utf-8 -# frozen_string_literal: false +# frozen_string_literal: true class MockExpectationError < StandardError; end # :nodoc: Index: test/lib/minitest/benchmark.rb =================================================================== --- test/lib/minitest/benchmark.rb (revision 59120) +++ test/lib/minitest/benchmark.rb (revision 59121) @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/minitest/benchmark.rb#L1 # encoding: utf-8 -# frozen_string_literal: false +# frozen_string_literal: true require 'minitest/unit' Index: test/lib/minitest/autorun.rb =================================================================== --- test/lib/minitest/autorun.rb (revision 59120) +++ test/lib/minitest/autorun.rb (revision 59121) @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/minitest/autorun.rb#L1 # encoding: utf-8 -# frozen_string_literal: false +# frozen_string_literal: true begin require 'rubygems' Index: test/lib/minitest/unit.rb =================================================================== --- test/lib/minitest/unit.rb (revision 59120) +++ test/lib/minitest/unit.rb (revision 59121) @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/minitest/unit.rb#L1 # encoding: utf-8 -# frozen_string_literal: false +# frozen_string_literal: true require "optparse" require "rbconfig" Index: test/lib/zombie_hunter.rb =================================================================== --- test/lib/zombie_hunter.rb (revision 59120) +++ test/lib/zombie_hunter.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/zombie_hunter.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true module ZombieHunter def after_teardown super Index: test/lib/iseq_loader_checker.rb =================================================================== --- test/lib/iseq_loader_checker.rb (revision 59120) +++ test/lib/iseq_loader_checker.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/iseq_loader_checker.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true begin require '-test-/iseq_load/iseq_load' Index: test/lib/memory_status.rb =================================================================== --- test/lib/memory_status.rb (revision 59120) +++ test/lib/memory_status.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/memory_status.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true begin require '-test-/memory_status.so' rescue LoadError Index: test/lib/test/unit/assertions.rb =================================================================== --- test/lib/test/unit/assertions.rb (revision 59120) +++ test/lib/test/unit/assertions.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'minitest/unit' require 'pp' @@ -452,7 +452,7 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L452 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 https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L543 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 https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L828 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 Index: test/lib/test/unit/testcase.rb =================================================================== --- test/lib/test/unit/testcase.rb (revision 59120) +++ test/lib/test/unit/testcase.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/testcase.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require 'test/unit/assertions' module Test Index: test/lib/test/unit/parallel.rb =================================================================== --- test/lib/test/unit/parallel.rb (revision 59120) +++ test/lib/test/unit/parallel.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/parallel.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../.." require 'test/unit' Index: test/lib/test/unit.rb =================================================================== --- test/lib/test/unit.rb (revision 59120) +++ test/lib/test/unit.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true begin gem 'minitest', '< 5.0.0' if defined? Gem rescue Gem::LoadError Index: test/lib/tracepointchecker.rb =================================================================== --- test/lib/tracepointchecker.rb (revision 59120) +++ test/lib/tracepointchecker.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/tracepointchecker.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true module TracePointChecker STATE = { count: 0, Index: test/lib/find_executable.rb =================================================================== --- test/lib/find_executable.rb (revision 59120) +++ test/lib/find_executable.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/find_executable.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true require "rbconfig" module EnvUtil Index: test/lib/leakchecker.rb =================================================================== --- test/lib/leakchecker.rb (revision 59120) +++ test/lib/leakchecker.rb (revision 59121) @@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/test/lib/leakchecker.rb#L1 -# frozen_string_literal: false +# frozen_string_literal: true class LeakChecker def initialize @fd_info = find_fds -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/