@@ -48,8 +48,7 @@ class Array<T> {
return ret;
}
public function push(x : T) : Int {
- lua.Lua.rawset(untyped this, length,x);
- length++;
+ this[this.length] = x;
return length;
public function reverse() : Void {
@@ -89,7 +89,7 @@ class String {
ret.push(match);
idx = newidx + delimiter.length;
} else {
- ret.push(NativeStringTools.sub(this,idx,NativeStringTools.len(this)).match);
+ ret.push(NativeStringTools.sub(this,idx,this.length).match);
idx = null;