use Function.call(), not Function.apply()

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4941 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Tom Conkling
2008-02-20 00:55:28 +00:00
parent 8929c2e89e
commit 6dee96bb15
+2 -2
View File
@@ -183,7 +183,7 @@ public class RingBuffer
public function every (callback :Function, thisObject :* = null) :Boolean public function every (callback :Function, thisObject :* = null) :Boolean
{ {
for (var i :int = 0; i < _length; ++i) { for (var i :int = 0; i < _length; ++i) {
if (!callback.apply(thisObject, this.at(i))) { if (!callback.call(thisObject, this.at(i))) {
return false; return false;
} }
} }
@@ -197,7 +197,7 @@ public class RingBuffer
public function forEach (callback :Function, thisObject :* = null) :void public function forEach (callback :Function, thisObject :* = null) :void
{ {
for (var i :int = 0; i < _length; ++i) { for (var i :int = 0; i < _length; ++i) {
callback.apply(thisObject, this.at(i)); callback.call(thisObject, this.at(i));
} }
} }