It shouldn't, even in ES3 (read attentively).

Dmitry.

On 17.08.2011 8:44, John-David Dalton wrote:
So @kitcambridge and I were talking spec and started trying to find in
spec something that explains why something like:

Array.prototype.reduce which is by default  { [[Writable]]: true,
[[Enumerable]]: false, [[Configurable]]: true } will change to
[[Enumerable]]: true when:

Array.prototype.reduce = function() {…};

So far we have struck out.
In ES3 we found 8.6.2.2 [[Put]](P, V)
http://bclary.com/2004/11/07/#a-8.6.2.2
and its step 4:
4. Set the value of the property to V. The attributes of the property
are not changed.

And then we dug into ES5.1 and its [[Put]]
http://es5.github.com/#x8.12.5
and its step step 3a which leads to [[DefineOwnProperty]] with a Desc
of {[[Value]]: V} and its step 10b to 12, then 13.

but couldn't find where it stated changing the [[Enumerable]] attribute.

Would you all help point to where this is defined in spec?

Thanks,
JDD
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to