summaryrefslogtreecommitdiffstats
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
commit1ea82f72e69ab6ba320425ada4fc070ccfc528c7 (patch)
tree0c0c345cfb3f5c87b992a096646818c025d502ea /string.c
parenta85f68b6d470fdcd148a1e2525cde05f722e4d02 (diff)
downloadruby-1ea82f72e69ab6ba320425ada4fc070ccfc528c7.tar.gz
ruby-1ea82f72e69ab6ba320425ada4fc070ccfc528c7.tar.xz
ruby-1ea82f72e69ab6ba320425ada4fc070ccfc528c7.zip
* string.c: RDoc update for =~ method. a patch from Alex Young
<alex at blackkettle.org>. [ruby-core:08068] git-svn-id: http://svn.ruby-lang.org/repos/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 5010274cd..ff3ded900 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
*/