1
0
Fork 0
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:
akr 2007-12-02 14:42:05 +00:00
parent 1524572ce9
commit 7f65110b53

13
re.c
View file

@ -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)
{