1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* re.c (match_aref): Use <code> around indexing examples to prevent

hyperlinks.  [ruby-talk:389396]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-10-24 21:35:05 +00:00
parent 2bb5441808
commit 430f4da042
2 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Tue Oct 25 06:34:39 2011 Eric Hodel <drbrain@segment7.net>
* re.c (match_aref): Use <code> around indexing examples to prevent
hyperlinks. [ruby-talk:389396]
Mon Oct 24 23:55:31 2011 Tanaka Akira <akr@fsij.org>
* complex.c: use "__sun" instead of "__sun__" to detect SunOS.

11
re.c
View file

@ -1674,11 +1674,12 @@ name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name
* mtch[range] -> array
* mtch[name] -> str or nil
*
* Match Reference---<code>MatchData</code> acts as an array, and may be
* accessed using the normal array indexing techniques. <i>mtch</i>[0] is
* equivalent to the special variable <code>$&</code>, and returns the entire
* matched string. <i>mtch</i>[1], <i>mtch</i>[2], and so on return the values
* of the matched backreferences (portions of the pattern between parentheses).
* Match Reference -- <code>MatchData</code> acts as an array, and may be
* accessed using the normal array indexing techniques. <code>mtch[0]</code>
* is equivalent to the special variable <code>$&</code>, and returns the
* entire matched string. <code>mtch[1]</code>, <code>mtch[2]</code>, and so
* on return the values of the matched backreferences (portions of the
* pattern between parentheses).
*
* m = /(.)(.)(\d+)(\d)/.match("THX1138.")
* m #=> #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8">