[前][次][番号順一覧][スレッド一覧]

ruby-changes:66026

From: Adam <ko1@a...>
Date: Sat, 1 May 2021 09:13:24 +0900 (JST)
Subject: [ruby-changes:66026] f64d7674f6 (master): Fix example for custom warn method

https://git.ruby-lang.org/ruby.git/commit/?id=f64d7674f6

From f64d7674f6c03834754ec92054300eae7bac3015 Mon Sep 17 00:00:00 2001
From: Adam Daniels <adam@m...>
Date: Tue, 2 Mar 2021 12:33:20 -0500
Subject: Fix example for custom warn method

Regexp has a match? method.

[ci skip]
---
 error.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/error.c b/error.c
index c01919f..a0d81c8 100644
--- a/error.c
+++ b/error.c
@@ -293,7 +293,7 @@ rb_warning_s_warn(int argc, VALUE *argv, VALUE mod) https://github.com/ruby/ruby/blob/trunk/error.c#L293
  *  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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]