Subj : Re: "for each" bug To : netscape.public.mozilla.jseng From : Jason Date : Wed Apr 27 2005 07:16 am >Fixed. Thanks for reporting it. hmmm, I'm a little confused about what's going on & why an inner loop would affect an outer loop... in js_interp.c, if that variable "foreach" controls whether it's a "for each" loop vs. a "for" loop, and it causes the problem I described, then isn't the bug that this state variable should be stored on some kind of loop stack? Why would you have to reset it when a loop is complete, since that loop goes out of execution scope -- doesn't this fix cause the opposite problem, e.g. if you have two nested for-each loops, then will it cause the outer for-each loop to revert to a "for" loop? (I unfortunately don't have the capability here to quickly download & build the tip version of the spidermonkey source) sorry if I'm adding confusion, I'm not up-to-speed on the terminology or the inner workings of Javascript. .