aboutsummaryrefslogtreecommitdiffstats
path: root/NEWS
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-17 12:49:19 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-17 12:49:19 +0000
commitf8e2964065acada7fa764586e4a3f8e7c3b7d339 (patch)
tree8a08b62aacbad795a32d48834880fcac656403c2 /NEWS
parent3c7c983300670b29e6c7feb3b8c23421c53af01b (diff)
downloadruby-f8e2964065acada7fa764586e4a3f8e7c3b7d339.tar.gz
* NEWS: add Array#max, #min, and the optimization. [Feature #12172]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS14
1 files changed, 14 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index db4480aa45..0f08b3daf2 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,12 @@ with all sufficient information, see the ChangeLog file or Redmine
=== Core classes updates (outstanding ones only)
+* Array
+ * Array#max and Array#min. [Feature #12172]
+ This may cause a tiny incompatibility: if you redefine
+ Enumerable#max and call max to an Array, your redefinition will be
+ now ignored. You should also redefine Array#max.
+
* Dir
* Dir.empty?. [Feature #10121]
@@ -53,3 +59,11 @@ with all sufficient information, see the ChangeLog file or Redmine
=== Supported platform changes
=== Implementation improvements
+
+* In some condition, `[x, y].max` and `[x, y].min` are optimized
+ so that a temporal array is not created. The concrete condition is
+ an implementation detail: currently, the array literal must have no
+ splat, must have at least one expression but literal, the length must
+ be <= 0x100, and Array#max and min must not be redefined. It will work
+ in most casual and real-life use case where it is written with intent
+ to `Math.max(x, y)`.