diff --git a/classes.js b/classes.js index 31a13a16..5ba9f824 100644 --- a/classes.js +++ b/classes.js @@ -210,7 +210,7 @@ Classes.prototype.newPrimitiveArray = function(type, size) { } Classes.prototype.newArray = function(typeName, size) { - return this.getClass(typeName).constructor.call(null, size); + return new (this.getClass(typeName).constructor)(size); } Classes.prototype.newMultiArray = function(typeName, lengths) {