summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-27 14:15:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-27 14:15:37 +0000
commitfe6774d691b155df450d009f0de547bc54d3e7e9 (patch)
tree0c0c345cfb3f5c87b992a096646818c025d502ea /string.c
parent3764541f8efcd85cc4338040e398bdfb4fd5cdee (diff)
* 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
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 5010274cdb..ff3ded900a 100644
--- a/string.c
+++ b/string.c
@@ -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
*/