From db6447dc7b419b9f8d9c54c093672541cd295156 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 27 Jun 2006 14:14:25 +0000 Subject: * string.c: RDoc update for =~ method. a patch from Alex Young . [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 --- string.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'string.c') 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 obj is a Regexp, use it as a pattern to match - * against str. If obj is a String, look for it in - * str (similar to String#index). Returns the position the - * match starts, or nil if there is no match. Otherwise, invokes + * against str,and returns the position the match starts, or + * nil if there is no match. Otherwise, invokes * obj.=~, passing str as an argument. The default * =~ in Object returns false. * - * "cat o' 9 tails" =~ '\d' #=> nil * "cat o' 9 tails" =~ /\d/ #=> 7 * "cat o' 9 tails" =~ 9 #=> false */ -- cgit