[njs] Fixed typo introduced in c75a8fc6d534.

Dmitry Volyntsev xeioex at nginx.com
Fri Nov 1 13:58:42 UTC 2019


details:   https://hg.nginx.org/njs/rev/3e3b00388d69
branches:  
changeset: 1217:3e3b00388d69
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Fri Nov 01 15:48:21 2019 +0300
description:
Fixed typo introduced in c75a8fc6d534.

This closes #242 issue on Github.

diffstat:

 src/njs_object_hash.h    |  3 +--
 src/test/njs_unit_test.c |  9 +++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 151ac933c8f3 -r 3e3b00388d69 src/njs_object_hash.h
--- a/src/njs_object_hash.h	Thu Oct 31 19:53:21 2019 +0300
+++ b/src/njs_object_hash.h	Fri Nov 01 15:48:21 2019 +0300
@@ -538,9 +538,8 @@
     njs_djb_hash_add(                                                         \
     njs_djb_hash_add(                                                         \
     njs_djb_hash_add(                                                         \
-    njs_djb_hash_add(                                                         \
     njs_djb_hash_add(NJS_DJB_HASH_INIT,                                       \
-        'U'), 'R'), 'I'), 'e'), 'E'), 'r'), 'r'), 'o'), 'r')
+        'U'), 'R'), 'I'), 'E'), 'r'), 'r'), 'o'), 'r')
 
 
 #endif /* _NJS_OBJECT_HASH_H_INCLUDED_ */
diff -r 151ac933c8f3 -r 3e3b00388d69 src/test/njs_unit_test.c
--- a/src/test/njs_unit_test.c	Thu Oct 31 19:53:21 2019 +0300
+++ b/src/test/njs_unit_test.c	Fri Nov 01 15:48:21 2019 +0300
@@ -9240,6 +9240,15 @@ static njs_unit_test_t  njs_test[] =
     { njs_str("this"),
       njs_str("[object Object]") },
 
+    { njs_str("Object.getOwnPropertyDescriptor(this, 'NaN').value"),
+      njs_str("NaN") },
+
+    { njs_str("Object.getOwnPropertyDescriptors(this).NaN.value"),
+      njs_str("NaN") },
+
+    { njs_str("Object.getOwnPropertyNames(this).includes('NaN')"),
+      njs_str("true") },
+
     { njs_str("this.a = 1; this.a"),
       njs_str("1") },
 


More information about the nginx-devel mailing list