diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-07-15 23:30:32 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-07-15 23:33:24 +0900 |
commit | 9f4b7fc82e45531e0057f807548a4d1c2b248186 (patch) | |
tree | 0756ebb67eed8570e5a01764d0ffe55551e2f66c /tool | |
parent | 579645d9f870fa4116dcd3200bbbb6e2c0b7f400 (diff) | |
download | ruby-9f4b7fc82e45531e0057f807548a4d1c2b248186.tar.gz |
Check warning flags only if available to run with old versions
Diffstat (limited to 'tool')
-rw-r--r-- | tool/lib/leakchecker.rb | 2 |
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| |