Array#splice sparse array spec question.

2012-04-09 Thread John-David Dalton
Can someone confirm/reject that by spec (http://es5.github.com/#x15.4.4.12): // sparse array ;D var a=[0]; a[2]=2; // the resulting arrays length should be 1 and not 2 console.log(a.splice(0, 2).length); I'm seeing `2` in latest Chrome/FF. Thanks, -JDD

Re: Array#splice sparse array spec question.

2012-04-09 Thread Allen Wirfs-Brock
This is a spec. bug. Immediately before line10 of the algorithm there should be a line that says: Call the [[Put]] internal method of A with arguments length, actualDeleteCount, and true. The ES3 spec. has the equivalent of the above line. It was apparently inadvertently dropped

Re: Array#splice sparse array spec question.

2012-04-09 Thread Allen Wirfs-Brock
now https://bugs.ecmascript.org/show_bug.cgi?id=332 On Apr 9, 2012, at 8:51 AM, Allen Wirfs-Brock wrote: This is a spec. bug. Immediately before line10 of the algorithm there should be a line that says: Call the [[Put]] internal method of A with arguments length,