arguments object and eval
# Brendan Eich (16 years ago)
I replied to Dan privately but wanted to update the list: this is just
a SpiderMonkey bug, already fixed -- no need to bother y'all further.
I'll get someone to followup on the right list.
I replied to Dan privately but wanted to update the list: this is just
a SpiderMonkey bug, already fixed -- no need to bother y'all further.
I'll get someone to followup on the right list.
Maybe it's a wrong place to post, but I've tried to get any info through dev-tech-javascript at lists.mozilla.org but the question was completely ignored.
When using the folowing code:
function func() { var arguments = null; alert(arguments); eval("alert(arguments);"); }
func();
In all browsers it works as expected (both alerts give null), still with SpiderMonkey first alert gives null but the second object. Even worse:
function func() { eval("var arguments = null; alert(arguments);"); alert(arguments); }
func();
First alert gives object and the second null. In the specification for ES3.0 I could only find that eval inherits the calling scope. Is there any ambiguity in the specification that I'm missing and that Mozilla interprets this way or is this just a bug of implementation? It definitely looks like a bug, but I'm just curious if this is something I could expect to be fixed.
Thanx!