ruby-changes:58047
From: Koichi <ko1@a...>
Date: Mon, 30 Sep 2019 17:26:00 +0900 (JST)
Subject: [ruby-changes:58047] c3b84f2de8 (master): introduce debug check.
https://git.ruby-lang.org/ruby.git/commit/?id=c3b84f2de8 From c3b84f2de83a27acc638f99743bfa2c44bac621c Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Mon, 30 Sep 2019 17:23:36 +0900 Subject: 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. diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb index af9200b..d463eb2 100644 --- a/tool/lib/leakchecker.rb +++ b/tool/lib/leakchecker.rb @@ -18,10 +18,21 @@ class LeakChecker https://github.com/ruby/ruby/blob/trunk/tool/lib/leakchecker.rb#L18 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/