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
13
re.c
13
re.c
@ -1221,6 +1221,19 @@ match_string(VALUE match)
|
||||
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
|
||||
match_inspect(VALUE match)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user