mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 1 additions and 1 deletions
2
error.c
2
error.c
|
@ -293,7 +293,7 @@ rb_warning_s_warn(int argc, VALUE *argv, VALUE mod)
|
|||
* Example:
|
||||
* module MyWarningFilter
|
||||
* 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
|
||||
* else
|
||||
* super
|
||||
|
|
Loading…
Reference in a new issue