[njs] Fixed typo in njs_arg_type_string() for NJS_DATE_ARG.

Dmitry Volyntsev xeioex at nginx.com
Tue Jul 24 15:31:48 UTC 2018


details:   http://hg.nginx.org/njs/rev/a4e5abdc345d
branches:  
changeset: 567:a4e5abdc345d
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Tue Jul 24 18:29:25 2018 +0300
description:
Fixed typo in njs_arg_type_string() for NJS_DATE_ARG.

diffstat:

 njs/njs_vm.c             |  2 +-
 njs/test/njs_unit_test.c |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 673d8a9c92e2 -r a4e5abdc345d njs/njs_vm.c
--- a/njs/njs_vm.c	Mon Jul 23 18:04:53 2018 +0300
+++ b/njs/njs_vm.c	Tue Jul 24 18:29:25 2018 +0300
@@ -2441,7 +2441,7 @@ njs_arg_type_string(uint8_t arg)
         return "regexp";
 
     case NJS_DATE_ARG:
-        return "regexp";
+        return "date";
 
     default:
         return "unknown";
diff -r 673d8a9c92e2 -r a4e5abdc345d njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c	Mon Jul 23 18:04:53 2018 +0300
+++ b/njs/test/njs_unit_test.c	Tue Jul 24 18:29:25 2018 +0300
@@ -7518,7 +7518,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("true") },
 
     { nxt_string("[0].map(new Date().getDate)"),
-      nxt_string("TypeError: cannot convert void to regexp") },
+      nxt_string("TypeError: cannot convert void to date") },
 
     { nxt_string("new Date(eval)"),
       nxt_string("Invalid Date") },


More information about the nginx-devel mailing list