mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
document MatchData#inspect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1524572ce9
commit
7f65110b53
1 changed files with 13 additions and 0 deletions
13
re.c
13
re.c
|
@ -1221,6 +1221,19 @@ match_string(VALUE match)
|
||||||
return RMATCH(match)->str; /* str is frozen */
|
return RMATCH(match)->str; /* str is frozen */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
* mtch.inspect => str
|
||||||
|
*
|
||||||
|
* Returns a printable version of <i>mtch</i>.
|
||||||
|
*
|
||||||
|
* /.$/ =~ "foo"; puts $~.inspect
|
||||||
|
* #=> #<MatchData "o">
|
||||||
|
*
|
||||||
|
* /(.)(.)(.)/ =~ "foo"; puts $~.inspect
|
||||||
|
* #=> #<MatchData "foo" "f" "o" "o">
|
||||||
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
match_inspect(VALUE match)
|
match_inspect(VALUE match)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue