ruby-changes:62254
From: Nobuyoshi <ko1@a...>
Date: Wed, 15 Jul 2020 23:34:24 +0900 (JST)
Subject: [ruby-changes:62254] 9f4b7fc82e (master): Check warning flags only if available to run with old versions
https://git.ruby-lang.org/ruby.git/commit/?id=9f4b7fc82e From 9f4b7fc82e45531e0057f807548a4d1c2b248186 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 15 Jul 2020 23:30:32 +0900 Subject: Check warning flags only if available to run with old versions diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb index 5311cdd..4b01d57 100644 --- a/tool/lib/leakchecker.rb +++ b/tool/lib/leakchecker.rb @@ -265,7 +265,7 @@ class LeakChecker https://github.com/ruby/ruby/blob/trunk/tool/lib/leakchecker.rb#L265 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| -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/