ruby-changes:63265
From: Benoit <ko1@a...>
Date: Sat, 3 Oct 2020 20:20:18 +0900 (JST)
Subject: [ruby-changes:63265] d0778cb264 (master): Update example to handle keywords passed to Warning.warn
https://git.ruby-lang.org/ruby.git/commit/?id=d0778cb264 From d0778cb264cc899d2d4d9d98cfee06ef01883c3a Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Sat, 3 Oct 2020 13:19:24 +0200 Subject: Update example to handle keywords passed to Warning.warn diff --git a/error.c b/error.c index 1eccedf..4d534f7 100644 --- a/error.c +++ b/error.c @@ -277,11 +277,11 @@ rb_warning_s_warn(int argc, VALUE *argv, VALUE mod) https://github.com/ruby/ruby/blob/trunk/error.c#L277 * * Example: * module MyWarningFilter - * def warn(message) + * def warn(message, category: nil, **kwargs) * if /some warning I want to ignore/.matches?(message) * # ignore * else - * super(message) + * super * end * end * end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/