Subj : trouble with combination of "for/in" and "with" block To : netscape.public.mozilla.jseng From : archer Date : Fri Jul 23 2004 07:21 pm Hi, I use JSRef 1.5r6a and encounter the following problem: an object from outer scope ("i" in the example below) is being modified by a "for...in" iteration when it is placed inside a "with" block. Older JSRef (1.4?) used to run the same code without the problem, and so does WScript/CScript. Also, there is NO problem if ANY condition listed below is true: A. if "with" block is absent B. if "for( ; ; )" is used instead of "for...in" C. if object with same name as object in question appears somewhere else in the inner scope (of function "f()") I believe it is a bug, right? I did not find a test case that covers my set of conditions. I understand my case is very specific, and I totally agree that "with" statement is a poor practice to begin with. But this case that I have is present in an old code that I have running at a customer site. :( Is it possible to use some settings/switches to re-compile the JSRef to remedy this? Or does it have to be a fix? Please help if possible. Thanks! .