mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c: Fix the ambiguous description of the behavior of
rb_str_aref_m with a range. It returns nil when the beginning of the range is greater than the end of the string rather than the range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8cd2bf0721
commit
30a87f3535
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Jun 9 18:36:00 2011 Kenta Murata <mrkn@mrkn.jp>
|
||||
|
||||
* string.c: Fix the ambiguous description of the behavior of
|
||||
rb_str_aref_m with a range. It returns nil when the beginning of
|
||||
the range is greater than the end of the string rather than the range.
|
||||
|
||||
Thu Jun 9 10:57:03 2011 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||
|
||||
* ext/psych/lib/psych/visitors/to_ruby.rb: Hash subclasses can be read
|
||||
|
|
3
string.c
3
string.c
|
@ -3168,7 +3168,8 @@ rb_str_aref(VALUE str, VALUE indx)
|
|||
* characters 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.
|
||||
* is negative, or the beginning of the range is greater than the end of the
|
||||
* string.
|
||||
*
|
||||
* If a <code>Regexp</code> is supplied, the matching portion of <i>str</i> is
|
||||
* returned. If a numeric or name parameter follows the regular expression, that
|
||||
|
|
Loading…
Add table
Reference in a new issue