1
0
Fork 0
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:
Adam Daniels 2021-03-02 12:33:20 -05:00 committed by Jeremy Evans
parent a867d55279
commit f64d7674f6
Notes: git 2021-05-01 09:13:29 +09:00

View file

@ -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