From 2025346077b7a514d7fed11cac52c125e9a188c1 Mon Sep 17 00:00:00 2001 From: kosako Date: Fri, 24 Mar 2006 12:14:18 +0000 Subject: RDoc description updated git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index 29a84f3c5c..e0a5dd01cd 100644 --- a/re.c +++ b/re.c @@ -5,7 +5,7 @@ $Author$ created at: Mon Aug 9 18:24:49 JST 1993 - Copyright (C) 1993-2003 Yukihiro Matsumoto + Copyright (C) 1993-2006 Yukihiro Matsumoto **********************************************************************/ @@ -1177,9 +1177,10 @@ name_to_backref_number(struct re_registers *regs, VALUE regexp, char* name, char /* * call-seq: - * mtch[i] => obj + * mtch[i] => str or nil * mtch[start, length] => array * mtch[range] => array + * mtch[name] => str or nil * * Match Reference---MatchData acts as an array, and may be * accessed using the normal array indexing techniques. mtch[0] is @@ -1192,6 +1193,10 @@ name_to_backref_number(struct re_registers *regs, VALUE regexp, char* name, char * m[1, 2] #=> ["H", "X"] * m[1..3] #=> ["H", "X", "113"] * m[-3, 2] #=> ["X", "113"] + * + * m = /(?a+)b/.match("ccaaab") + * m["foo"] #=> "aaa" + * m[:foo] #=> "aaa" */ static VALUE -- cgit v1.2.3