summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-27 14:14:25 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-27 14:14:25 +0000
commitdb6447dc7b419b9f8d9c54c093672541cd295156 (patch)
treeb14eab922eb09349c4016ee8e9591a3d8c7dbd3d /string.c
parent864ff4eb37720444d934da8e8bf20dfd63f6e487 (diff)
downloadruby-db6447dc7b419b9f8d9c54c093672541cd295156.tar.gz
ruby-db6447dc7b419b9f8d9c54c093672541cd295156.tar.xz
ruby-db6447dc7b419b9f8d9c54c093672541cd295156.zip
* string.c: RDoc update for =~ method. a patch from Alex Young
<alex at blackkettle.org>. [ruby-core:08068] * io.c (pipe_open): backout unnecessary fix on 2006-06-26. [ruby-dev:28865] * eval.c (rb_yield_0): exact argument number check now done only for lambda Proc. * eval.c (rb_yield_0): add check for number of arguments, if there's one lambda block parameter. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/string.c b/string.c
index 136235580..96f93808c 100644
--- a/string.c
+++ b/string.c
@@ -1241,13 +1241,11 @@ rb_str_rindex_m(int argc, VALUE *argv, VALUE 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
*/