summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Daniels <adam@mediadrive.ca>2021-03-02 12:33:20 -0500
committerJeremy Evans <code@jeremyevans.net>2021-04-30 17:13:04 -0700
commitf64d7674f6c03834754ec92054300eae7bac3015 (patch)
treedbb0b92ab2ba2a847a0e08b0f53b40404f6bceab
parenta867d55279971a45188f1d64c9f94008c450eea0 (diff)
Fix example for custom warn method
Regexp has a match? method. [ci skip]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4236
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index c01919f698..a0d81c8d94 100644
--- a/error.c
+++ b/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