diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-01 04:28:58 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-01 04:28:58 +0000 |
commit | d301b4d80bfdab57a9e8250b124d1de0ea0d1b62 (patch) | |
tree | f0fe87e7f98e2608b0676233a278ba84dd4cab44 /string.c | |
parent | b8b48f9d58619e55c33106f8dfa21fc70c63e7ad (diff) |
Fix rdoc of String#byteslice. Feature #4447
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4064,11 +4064,12 @@ str_byte_aref(VALUE str, VALUE indx) * 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" |