ruby-changes:19915
From: mrkn <ko1@a...>
Date: Thu, 9 Jun 2011 18:39:54 +0900 (JST)
Subject: [ruby-changes:19915] mrkn:r31962 (trunk): * string.c: Fix the ambiguous description of the behavior of
mrkn 2011-06-09 18:39:47 +0900 (Thu, 09 Jun 2011) New Revision: 31962 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31962 Log: * 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. Modified files: trunk/ChangeLog trunk/string.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31961) +++ ChangeLog (revision 31962) @@ -1,3 +1,9 @@ +Thu Jun 9 18:36:00 2011 Kenta Murata <mrkn@m...> + + * 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@t...> * ext/psych/lib/psych/visitors/to_ruby.rb: Hash subclasses can be read Index: string.c =================================================================== --- string.c (revision 31961) +++ string.c (revision 31962) @@ -3168,7 +3168,8 @@ * 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/