From 8303bc6cf6d67aa203d57a8ba1810a669766eb46 Mon Sep 17 00:00:00 2001 From: stomar Date: Thu, 11 May 2017 18:59:45 +0000 Subject: [PATCH] string.c: docs for String#match * string.c: [DOC] add example for String#match with pos argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 1 + 1 file changed, 1 insertion(+) diff --git a/string.c b/string.c index 7a9b22ca7f..56ed266b7c 100644 --- a/string.c +++ b/string.c @@ -3657,6 +3657,7 @@ static VALUE get_pat(VALUE); * 'hello'.match('(.)\1') #=> # * 'hello'.match('(.)\1')[0] #=> "ll" * 'hello'.match(/(.)\1/)[0] #=> "ll" + * 'hello'.match(/(.)\1/, 3) #=> nil * 'hello'.match('xx') #=> nil * * If a block is given, invoke the block with MatchData if match succeed, so