ruby-changes:18959
From: naruse <ko1@a...>
Date: Tue, 1 Mar 2011 13:29:10 +0900 (JST)
Subject: [ruby-changes:18959] Ruby:r30992 (trunk): Fix rdoc of String#byteslice. Feature #4447
naruse 2011-03-01 13:28:58 +0900 (Tue, 01 Mar 2011) New Revision: 30992 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30992 Log: Fix rdoc of String#byteslice. Feature #4447 Modified files: trunk/string.c Index: string.c =================================================================== --- string.c (revision 30991) +++ string.c (revision 30992) @@ -4064,11 +4064,12 @@ * Byte Reference---If passed a single <code>Fixnum</code>, returns a * substring of one byte at that position. If passed two <code>Fixnum</code> * objects, returns a substring starting at the offset given by the first, and - * a length given by the second. If given a range, a substring containing + * a length given by the second. If given a <code>Range</code>, a substring containing * bytes at offsets given by the range is returned. In all three cases, if * an offset is negative, it is counted from the end of <i>str</i>. Returns * <code>nil</code> if the initial offset falls outside the string, the length * is negative, or the beginning of the range is greater than the end. + * The encoding of th3 resulted string is always ASCII-8BIT. * * "hello".byteslice(1) #=> "e" * "hello".byteslice(-1) #=> "o" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/