From 38c1d1eb9c97e870dc2b60052eb1e6004a577b36 Mon Sep 17 00:00:00 2001 From: "pschwartau%netscape.com" Date: Wed, 18 Apr 2001 22:33:31 +0000 Subject: [PATCH] "for (i in myArray)" produces unintentional side effects if a test modifies Array.prototype or Object.prototype. Use for (i=0; __; i++) instead. --- js/tests/ecma_3/shell.js | 8 ++++---- js/tests/js1_5/shell.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/tests/ecma_3/shell.js b/js/tests/ecma_3/shell.js index 1276f64bd59..cbc4069fadc 100644 --- a/js/tests/ecma_3/shell.js +++ b/js/tests/ecma_3/shell.js @@ -40,8 +40,8 @@ function reportFailure (msg) var funcName = currentFunc(); var prefix = (funcName) ? "[reported from " + funcName + "] ": ""; - for (l in lines) - print (FAILED + prefix + lines[l]); + for (var i=0; i