ruby-changes:51580
From: normal <ko1@a...>
Date: Sat, 30 Jun 2018 06:01:28 +0900 (JST)
Subject: [ruby-changes:51580] normal:r63791 (trunk): test/lib/test/unit/assertions.rb (assert_in_out_err): disable gems
normal 2018-06-30 06:01:23 +0900 (Sat, 30 Jun 2018) New Revision: 63791 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63791 Log: test/lib/test/unit/assertions.rb (assert_in_out_err): disable gems RubyGems loading is still a bottleneck at startup and this speeds up test/ruby/test_rubyoptions.rb test from 15s => 3.5s on the fastest machine I have access to. Modified files: trunk/test/lib/test/unit/assertions.rb Index: test/lib/test/unit/assertions.rb =================================================================== --- test/lib/test/unit/assertions.rb (revision 63790) +++ test/lib/test/unit/assertions.rb (revision 63791) @@ -583,6 +583,8 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L583 def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil, success: nil, **opt) + args = Array(args).dup + args.insert((Hash === args[0] ? 1 : 0), '--disable=gems') stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, **opt) if signo = status.termsig EnvUtil.diagnostic_reports(Signal.signame(signo), status.pid, Time.now) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/