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

* string.c: RDoc update for =~ method. a patch from Alex Young

<alex at blackkettle.org>.  [ruby-core:08068]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-06-27 14:15:37 +00:00
parent 3764541f8e
commit fe6774d691
2 changed files with 7 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Tue Jun 27 23:03:49 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c: RDoc update for =~ method. a patch from Alex Young
<alex at blackkettle.org>. [ruby-core:08068]
Tue Jun 27 22:47:18 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/tcltklib.c: forgot to update TCLTKLIB_RELEASE_DATE.

View file

@ -1278,13 +1278,11 @@ rb_str_rindex_m(argc, argv, str)
* str =~ obj => fixnum or nil
*
* Match---If <i>obj</i> is a <code>Regexp</code>, use it as a pattern to match
* against <i>str</i>. If <i>obj</i> is a <code>String</code>, look for it in
* <i>str</i> (similar to <code>String#index</code>). Returns the position the
* match starts, or <code>nil</code> if there is no match. Otherwise, invokes
* against <i>str</i>,and returns the position the match starts, or
* <code>nil</code> if there is no match. Otherwise, invokes
* <i>obj.=~</i>, passing <i>str</i> as an argument. The default
* <code>=~</code> in <code>Object</code> returns <code>false</code>.
*
* "cat o' 9 tails" =~ '\d' #=> nil
* "cat o' 9 tails" =~ /\d/ #=> 7
* "cat o' 9 tails" =~ 9 #=> false
*/