summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJared A. Scheel <jared@jaredscheel.com>2017-09-03 15:56:34 -0500
committerJared A. Scheel <jared@jaredscheel.com>2017-09-03 15:56:34 -0500
commit11947b4584bce76167ea2dc7e6f63039d4811205 (patch)
tree57793f5d89f23e49e0747dd9d6defd21f805f7e5 /doc
parentadde89e8b1c66b4f4814c3b47a5d347ff576428b (diff)
Add note to Array#sort_custom about the dangers of using random return values
Diffstat (limited to 'doc')
-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>