summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-04 16:24:45 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-04 17:00:52 +0900
commit2b7454eb922ccbda065affc92e2e94c7c28b809f (patch)
treec3f0983400d43a7475b9f524691f32735eb70a9e /tool
parent047471c52960e32146025fab064487d25f92a141 (diff)
Update leaked-globals [Bug #16934]
* match uppercase types which would be global, other than [BDT] * ignore `RUBY_` prefixed symbols
Diffstat (limited to 'tool')
-rwxr-xr-xtool/leaked-globals4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/leaked-globals b/tool/leaked-globals
index ec116211de..0fb9e657c9 100755
--- a/tool/leaked-globals
+++ b/tool/leaked-globals
@@ -21,10 +21,10 @@ print "Checking leaked global symbols..."
STDOUT.flush
IO.foreach("|#{NM} -Pgp #{ARGV.join(' ')}") do |line|
n, t, = line.split
- next unless /[BDT]/ =~ t
+ next unless /[A-TV-Z]/ =~ t
next unless n.sub!(/^#{SYMBOL_PREFIX}/o, "")
next if n.include?(".")
- next if /\A(?:Init_|InitVM_|ruby_|rb_|[Oo]nig|dln_|mjit_|coroutine_|nu(?:comp|rat)_)/ =~ n
+ next if /\A(?:Init_|InitVM_|RUBY_|ruby_|rb_|[Oo]nig|dln_|mjit_|coroutine_|nu(?:comp|rat)_)/ =~ n
next if REPLACE.include?(n)
puts col.fail("leaked") if count.zero?
count += 1