summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-11 18:59:45 +0000
committerstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-11 18:59:45 +0000
commit8303bc6cf6d67aa203d57a8ba1810a669766eb46 (patch)
treedbaea3e5b31039b170a45c33c7712f85dda7fc69 /string.c
parent4a0eaeeb4dd5d25b26ddec62abd035c4172d4af3 (diff)
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
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
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') #=> #<MatchData "ll" 1:"l">
* '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