diff options
author | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-11 18:59:45 +0000 |
---|---|---|
committer | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-11 18:59:45 +0000 |
commit | 8303bc6cf6d67aa203d57a8ba1810a669766eb46 (patch) | |
tree | dbaea3e5b31039b170a45c33c7712f85dda7fc69 /string.c | |
parent | 4a0eaeeb4dd5d25b26ddec62abd035c4172d4af3 (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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |