You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2024/10/08 16:23:51 UTC
(couchdb) 01/01: Document another incompatibility between SM 1.8.5 and 78+
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch doc-more-monkey-incompat
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 5db3dca149f867426cca20b44fcc1e43c217bf1a
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Tue Oct 8 12:21:33 2024 -0400
Document another incompatibility between SM 1.8.5 and 78+
This is gnarly as this is something a user might put in a filter function, so
they'd start getting unexpected results after the upgrade.
```
% js
js> "abc".match(undefined)
null
% js91
js> "abc".match(undefined)
[""]
```
---
src/docs/src/best-practices/jsdevel.rst | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/docs/src/best-practices/jsdevel.rst b/src/docs/src/best-practices/jsdevel.rst
index 73cf0021d..cda39b36e 100644
--- a/src/docs/src/best-practices/jsdevel.rst
+++ b/src/docs/src/best-practices/jsdevel.rst
@@ -209,6 +209,21 @@ Spidermonkey 91 output also match QuickJS and v8.
js> r={}; ["Xyz", "abc", 1].forEach(function(v) {r[v]=v;}); Object.keys(r)
["1", "Xyz", "abc"]
+7. String ``match(undefined)``
+
+ Spidermonkey 1.8.5 returns ``null`` for ``match(undefined)`` while versions
+ starting with at least ``78`` return ``[""]``.
+
+.. code-block:: bash
+
+ % js
+ js> "abc".match(undefined)
+ null
+
+ % js91
+ js> "abc".match(undefined)
+ [""]
+
Using QuickJS
=============