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:
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user