arguments object and eval

Dan Tsimbala slip777sg at
Thu Apr 30 14:30:56 PDT 2009


Maybe it's a wrong place to post, but I've tried to get any info through
dev-tech-javascript at but the question was completely

When using the folowing code:

function func() {
    var arguments = null;


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);");


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list