From c79e3a5957ac57d2d4e9ecd82648c7ecca7929d2 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Tue, 14 Apr 2020 12:38:30 +0900 Subject: [PATCH] Add {Regexp,String}#match with block to call-seq [ci skip] --- re.c | 4 ++-- string.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/re.c b/re.c index a429c33319..11f7e615b8 100644 --- a/re.c +++ b/re.c @@ -3265,8 +3265,8 @@ rb_reg_match2(VALUE re) /* * call-seq: - * rxp.match(str) -> matchdata or nil - * rxp.match(str,pos) -> matchdata or nil + * rxp.match(str, pos=0) -> matchdata or nil + * rxp.match(str, pos=0) {|match| block } -> obj * * Returns a MatchData object describing the match, or * nil if there was no match. This is equivalent to diff --git a/string.c b/string.c index ca21e0001c..c64b2735f9 100644 --- a/string.c +++ b/string.c @@ -3841,8 +3841,8 @@ static VALUE get_pat(VALUE); /* * call-seq: - * str.match(pattern) -> matchdata or nil - * str.match(pattern, pos) -> matchdata or nil + * str.match(pattern, pos=0) -> matchdata or nil + * str.match(pattern, pos=0) {|match| block } -> obj * * Converts pattern to a Regexp (if it isn't already one), * then invokes its match method on the receiver.