diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 3f953c43..a6097660 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2114,8 +2114,24 @@ (or (not= tx (type y)) (case tx - :tuple (or (not= (length x) (length y)) (some identity (map deep-not= x y))) - :array (or (not= (length x) (length y)) (some identity (map deep-not= x y))) + :tuple (or (not= (length x) (length y)) + (do + (var ret false) + (forv i 0 (length x) + (def xx (in x i)) + (def yy (in y i)) + (if (deep-not= xx yy) + (break (set ret true)))) + ret)) + :array (or (not= (length x) (length y)) + (do + (var ret false) + (forv i 0 (length x) + (def xx (in x i)) + (def yy (in y i)) + (if (deep-not= xx yy) + (break (set ret true)))) + ret)) :struct (deep-not= (kvs x) (kvs y)) :table (deep-not= (table/to-struct x) (table/to-struct y)) :buffer (not= (string x) (string y)) diff --git a/test/suite0001.janet b/test/suite0001.janet index cbe356c7..ccda77e4 100644 --- a/test/suite0001.janet +++ b/test/suite0001.janet @@ -329,6 +329,8 @@ (assert (deep= (map + [1 2 3 4] [10 20 30] [100 200]) @[111 222])) (assert (deep= (map + [1 2 3 4] [10 20 30] [100 200] [1000]) @[1111])) +(assert (= false (deep-not= [1] [1])) "issue #1149") + # Sort function (assert (deep= (range 99)