Re: 15.3.4.3 Function.prototype.apply (thisArg, argArray)

2010-10-28 Thread Asen Bozhilov
Jeff Walden: Check out the ES5 erratum -- steps 5 and 7 have been removed. http://wiki.ecmascript.org/doku.php Thank you for the link, but I have some question about this. Now I can pass array like object with strange length property and this is not cause an Error. For example: length = -1;

Re: 15.3.4.3 Function.prototype.apply (thisArg, argArray)

2010-10-28 Thread Jose Antonio Perez
The aim has been consistency. All Array generic own methods that explicitly use the length property have the same behavior: - Let lenVal be the result of calling the [[Get]] internal method of O with argument length. - Let len be ToUint32(lenVal). Function.prototype.apply now behave the same

Re: 15.3.4.3 Function.prototype.apply (thisArg, argArray)

2010-10-28 Thread Jose Antonio Perez
In ES5-15.4 is clearly defined what is an index and what conditions must verify length A property name P (in the form of a String value) is an array index if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32-1 Every Array object has a length property whose

RE: 15.3.4.3 Function.prototype.apply (thisArg, argArray)

2010-10-28 Thread Allen Wirfs-Brock
-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Jose Antonio Perez Sent: Thursday, October 28, 2010 8:41 AM To: Asen Bozhilov Cc: es-discuss Subject: Re: 15.3.4.3 Function.prototype.apply (thisArg, argArray) In ES5-15.4 is clearly defined what is an index and what

15.3.4.3 Function.prototype.apply (thisArg, argArray)

2010-10-27 Thread Asen Bozhilov
ES5 does some changes in Function.prototype.apply. It allows generic array-like object for a second argument of `apply' method. | 6. Let n be ToUint32(len). | 7. If n is not equal to ToNumber(len), then throw a TypeError exception. Isn't better to throws a RangeError instead of TypeError? Is

Re: 15.3.4.3 Function.prototype.apply (thisArg, argArray)

2010-10-27 Thread Jeff Walden
Check out the ES5 erratum -- steps 5 and 7 have been removed. http://wiki.ecmascript.org/doku.php Jeff ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss