зеркало из https://github.com/github/ruby.git
introduce debug check.
There are random failures: > lib/rubygems/core_ext/kernel_require.rb:61:in `require': > wrong number of arguments (given 1, expected 0) (ArgumentError) http://ci.rvm.jp/results/trunk-jemalloc@silicon-docker/2275159 To check this failure, I added a small check code.
This commit is contained in:
Родитель
88f38c187e
Коммит
c3b84f2de8
|
@ -18,10 +18,21 @@ class LeakChecker
|
|||
check_encodings(test_name),
|
||||
check_safe(test_name),
|
||||
check_verbose(test_name),
|
||||
check_require_arity(test_name),
|
||||
]
|
||||
GC.start if leaks.any?
|
||||
end
|
||||
|
||||
# to debug
|
||||
def check_require_arity test_name
|
||||
begin
|
||||
require 'enumerator' # to check require's arity
|
||||
rescue ArgumentError => e
|
||||
STDERR.puts "#{e.message} on #{test_name}"
|
||||
raise
|
||||
end
|
||||
end
|
||||
|
||||
def check_safe test_name
|
||||
puts "#{test_name}: $SAFE == #{$SAFE}" unless $SAFE == 0
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче