From d301b4d80bfdab57a9e8250b124d1de0ea0d1b62 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 1 Mar 2011 04:28:58 +0000 Subject: Fix rdoc of String#byteslice. Feature #4447 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/string.c b/string.c index 9cc93722ab..1a34bf148d 100644 --- a/string.c +++ b/string.c @@ -4064,11 +4064,12 @@ str_byte_aref(VALUE str, VALUE indx) * Byte Reference---If passed a single Fixnum, returns a * substring of one byte at that position. If passed two Fixnum * 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 Range, 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 str. Returns * nil 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" -- cgit v1.2.3