summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-09 09:39:47 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-09 09:39:47 +0000
commit30a87f353550aa112cdcb598641de22587ae0c68 (patch)
treecfd6a3de23056d8bf93440d463932aa470e1b542 /string.c
parent8cd2bf072180a9f733ac06dbaa96f071ca8e8303 (diff)
* 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
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/string.c b/string.c
index 0148d55be2..6722457486 100644
--- a/string.c
+++ b/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