summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-09-30 17:23:36 +0900
committerKoichi Sasada <ko1@atdot.net>2019-09-30 17:23:36 +0900
commitc3b84f2de83a27acc638f99743bfa2c44bac621c (patch)
treec028efb868eb761668115e4ad2f167ae66fda779 /tool
parent88f38c187e3171f8f351f3198247d20ea9f016ee (diff)
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.
Diffstat (limited to 'tool')
-rw-r--r--tool/lib/leakchecker.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb
index af9200bf77..d463eb235f 100644
--- a/tool/lib/leakchecker.rb
+++ b/tool/lib/leakchecker.rb
@@ -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