1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Check warning flags only if available to run with old versions

This commit is contained in:
Nobuyoshi Nakada 2020-07-15 23:30:32 +09:00
parent 579645d9f8
commit 9f4b7fc82e
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -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|