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:
parent
579645d9f8
commit
9f4b7fc82e
1 changed files with 1 additions and 1 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Reference in a new issue