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

assertions.rb: fix assert_no_memory_leak

* test/lib/test/unit/assertions.rb (assert_no_memory_leak): fix
  path of memory_status.rb, as this method has been moved.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-02-17 08:29:58 +00:00
parent b6053df008
commit c00d51c739

View file

@ -637,14 +637,14 @@ eom
end
def assert_no_memory_leak(args, prepare, code, message=nil, limit: 2.0, rss: false, **opt)
require_relative 'memory_status'
require_relative '../../memory_status'
token = "\e[7;1m#{$$.to_s}:#{Time.now.strftime('%s.%L')}:#{rand(0x10000).to_s(16)}:\e[m"
token_dump = token.dump
token_re = Regexp.quote(token)
envs = args.shift if Array === args and Hash === args.first
args = [
"--disable=gems",
"-r", File.expand_path("../memory_status", __FILE__),
"-r", File.expand_path("../../../memory_status", __FILE__),
*args,
"-v", "-",
]