summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-02-01 20:44:12 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-02-02 10:42:53 +0900
commitf22bec79fed582f10e1791c421ebc760121b8878 (patch)
tree20bd14e64ccbc9cbe51dcb011bc63e3eb69bb8b7 /tool
parent7b93e65e9f9cb7abfc7e19aff4da9d6e4c32de4b (diff)
leaked-globals: More accurately extract checked function names
Diffstat (limited to 'tool')
-rwxr-xr-xtool/leaked-globals4
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/leaked-globals b/tool/leaked-globals
index ee75f78d1d..3e3bda5632 100755
--- a/tool/leaked-globals
+++ b/tool/leaked-globals
@@ -47,7 +47,9 @@ if platform and !platform.empty?
end
missing = File.dirname(config) + "/missing/"
ARGV.reject! do |n|
- unless (src = Dir.glob(missing + File.basename(n, ".*") + ".[cS]")).empty?
+ base = File.basename(n, ".*")
+ next true if REPLACE.include?(base)
+ unless (src = Dir.glob(missing + base + ".[cS]")).empty?
puts "Ignore #{col.skip(n)} because of #{src.map {|s| File.basename(s)}.join(', ')} under missing"
true
end