Fix example for custom warn method
Regexp has a match? method. [ci skip]
This commit is contained in:
parent
a867d55279
commit
f64d7674f6
Notes:
git
2021-05-01 09:13:29 +09:00
2
error.c
2
error.c
@ -293,7 +293,7 @@ rb_warning_s_warn(int argc, VALUE *argv, VALUE mod)
|
|||||||
* Example:
|
* Example:
|
||||||
* module MyWarningFilter
|
* module MyWarningFilter
|
||||||
* def warn(message, category: nil, **kwargs)
|
* def warn(message, category: nil, **kwargs)
|
||||||
* if /some warning I want to ignore/.matches?(message)
|
* if /some warning I want to ignore/.match?(message)
|
||||||
* # ignore
|
* # ignore
|
||||||
* else
|
* else
|
||||||
* super
|
* super
|
||||||
|
Loading…
x
Reference in New Issue
Block a user