From: Alex Young Date: 2006-06-27T23:00:44+09:00 Subject: Re: Core documentation patches --------------030509070802010804010908 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Core documentation patches" > on Tue, 27 Jun 2006 18:46:40 +0900, Alex Young writes: > > |I've got a little documentation patch for 1.8.5... Should it go here? > > Yes, drbrain or myself would commit the patch. > > matz. Excellent. A minor correction to the String#=~ documentation is attached. It had me running round in circles for a bit. -- Alex --------------030509070802010804010908 Content-Type: text/plain; name="string-match.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="string-match.diff" Index: string.c =================================================================== --- string.c (revision 1) +++ string.c (working copy) @@ -1278,13 +1278,11 @@ * 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 */ --------------030509070802010804010908--