summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-09-04 08:13:50 +0200
committerGitHub <noreply@github.com>2017-09-04 08:13:50 +0200
commit3873362b3df0c1c03746225f8e43b629bd0864cc (patch)
tree88a1f82931593799b586899fb42d3385137a9a53
parentb5d2d0a9a502416a03f303fc30bee8a7ec8e93e2 (diff)
parent11947b4584bce76167ea2dc7e6f63039d4811205 (diff)
Merge pull request #10944 from jscheel/js/add-node-to-sort-custom-docs
Add note to Array#sort_custom about the dangers of using random values
-rw-r--r--doc/base/classes.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index e04ccc724d..a067bf2c6f 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -5670,7 +5670,7 @@
<argument index="1" name="func" type="String">
</argument>
<description>
- Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
+ Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
</description>
</method>
</methods>