aboutsummaryrefslogtreecommitdiffstats
path: root/range.c
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-05 05:27:42 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-05 05:27:42 +0000
commit9afde67360c7f149c54a92d84a278870615fb297 (patch)
treeb5fe090d3f07b141710840af104b1bd2ebcf6d1f /range.c
parent3fe8103d15c1837e15016c520217ef6dc9d7671d (diff)
downloadruby-9afde67360c7f149c54a92d84a278870615fb297.tar.gz
* range.c: Add docs for max/min behavior with exclusive range.
[fix GH-1433][ci skip] Patch by @BM5k git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/range.c b/range.c
index 3b5d7dc870..27c6ddd1ee 100644
--- a/range.c
+++ b/range.c
@@ -911,7 +911,8 @@ range_last(int argc, VALUE *argv, VALUE range)
* rng.min(n) {| a,b | block } -> array
*
* Returns the minimum value in the range. Returns +nil+ if the begin
- * value of the range is larger than the end value.
+ * value of the range is larger than the end value. Returns +nil+ if
+ * the begin value of an exclusive range is equal to the end value.
*
* Can be given an optional block to override the default comparison
* method <code>a <=> b</code>.
@@ -948,7 +949,8 @@ range_min(int argc, VALUE *argv, VALUE range)
* rng.max(n) {| a,b | block } -> obj
*
* Returns the maximum value in the range. Returns +nil+ if the begin
- * value of the range larger than the end value.
+ * value of the range larger than the end value. Returns +nil+ if
+ * the begin value of an exclusive range is equal to the end value.
*
* Can be given an optional block to override the default comparison
* method <code>a <=> b</code>.