arguments object and eval
Dan Tsimbala
slip777sg at gmail.com
Thu Apr 30 14:30:56 PDT 2009
Hi!
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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20090430/37d199bf/attachment.html>
More information about the es-discuss
mailing list