Update example to handle keywords passed to Warning.warn
This commit is contained in:
parent
fced98f464
commit
d0778cb264
4
error.c
4
error.c
@ -277,11 +277,11 @@ rb_warning_s_warn(int argc, VALUE *argv, VALUE mod)
|
||||
*
|
||||
* 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user