aboutsummaryrefslogtreecommitdiffstats
path: root/tool/lib/leakchecker.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-15 23:30:32 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-15 23:33:24 +0900
commit9f4b7fc82e45531e0057f807548a4d1c2b248186 (patch)
tree0756ebb67eed8570e5a01764d0ffe55551e2f66c /tool/lib/leakchecker.rb
parent579645d9f870fa4116dcd3200bbbb6e2c0b7f400 (diff)
downloadruby-9f4b7fc82e45531e0057f807548a4d1c2b248186.tar.gz
Check warning flags only if available to run with old versions
Diffstat (limited to 'tool/lib/leakchecker.rb')
-rw-r--r--tool/lib/leakchecker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb
index 5311cddfe0..4b01d57792 100644
--- a/tool/lib/leakchecker.rb
+++ b/tool/lib/leakchecker.rb
@@ -265,7 +265,7 @@ class LeakChecker
leaked
end
- WARNING_CATEGORIES = %i[deprecated experimental].freeze
+ WARNING_CATEGORIES = (Warning.respond_to?(:[]) ? %i[deprecated experimental] : []).freeze
def find_warning_flags
WARNING_CATEGORIES.to_h do |category|