From 478d1da7fa024606ffbea869118d26710945c81d Mon Sep 17 00:00:00 2001 From: mame Date: Thu, 26 Jun 2008 14:58:59 +0000 Subject: * string.c (rb_str_index_m, rb_str_rindex_m, rb_str_include): fix rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 30143593bf..7877e64a98 100644 --- a/string.c +++ b/string.c @@ -2093,19 +2093,17 @@ rb_str_index(VALUE str, VALUE sub, long offset) /* * call-seq: * str.index(substring [, offset]) => fixnum or nil - * str.index(fixnum [, offset]) => fixnum or nil * str.index(regexp [, offset]) => fixnum or nil * - * Returns the index of the first occurrence of the given substring, - * character (fixnum), or pattern (regexp) in str. Returns - * nil if not found. If the second parameter is present, it - * specifies the position in the string to begin the search. + * Returns the index of the first occurrence of the given substring or + * pattern (regexp) in str. Returns nil if not + * found. If the second parameter is present, it specifies the position in the + * string to begin the search. * * "hello".index('e') #=> 1 * "hello".index('lo') #=> 3 * "hello".index('a') #=> nil * "hello".index(?e) #=> 1 - * "hello".index(101) #=> 1 * "hello".index(/[aeiou]/, -3) #=> 4 */ @@ -2202,20 +2200,18 @@ rb_str_rindex(VALUE str, VALUE sub, long pos) /* * call-seq: * str.rindex(substring [, fixnum]) => fixnum or nil - * str.rindex(fixnum [, fixnum]) => fixnum or nil * str.rindex(regexp [, fixnum]) => fixnum or nil * - * Returns the index of the last occurrence of the given substring, - * character (fixnum), or pattern (regexp) in str. Returns - * nil if not found. If the second parameter is present, it - * specifies the position in the string to end the search---characters beyond - * this point will not be considered. + * Returns the index of the last occurrence of the given substring or + * pattern (regexp) in str. Returns nil if not + * found. If the second parameter is present, it specifies the position in the + * string to end the search---characters beyond this point will not be + * considered. * * "hello".rindex('e') #=> 1 * "hello".rindex('l') #=> 3 * "hello".rindex('a') #=> nil * "hello".rindex(?e) #=> 1 - * "hello".rindex(101) #=> 1 * "hello".rindex(/[aeiou]/, -2) #=> 1 */ @@ -3596,7 +3592,6 @@ rb_str_reverse_bang(VALUE str) /* * call-seq: * str.include? other_str => true or false - * str.include? fixnum => true or false * * Returns true if str contains the given string or * character. -- cgit v1.2.3