From owner-freebsd-bugs@FreeBSD.ORG Thu Apr 26 09:20:07 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C8A8106566B for ; Thu, 26 Apr 2012 09:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EE6F48FC17 for ; Thu, 26 Apr 2012 09:20:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q3Q9K6Gb066279 for ; Thu, 26 Apr 2012 09:20:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q3Q9K6WT066278; Thu, 26 Apr 2012 09:20:06 GMT (envelope-from gnats) Resent-Date: Thu, 26 Apr 2012 09:20:06 GMT Resent-Message-Id: <201204260920.q3Q9K6WT066278@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, tuSVYNkoKaQai Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53156106564A for ; Thu, 26 Apr 2012 09:16:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 3C1C88FC15 for ; Thu, 26 Apr 2012 09:16:53 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q9GqKe087907 for ; Thu, 26 Apr 2012 09:16:52 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q3Q9Gq16087904; Thu, 26 Apr 2012 09:16:52 GMT (envelope-from nobody) Message-Id: <201204260916.q3Q9Gq16087904@red.freebsd.org> Date: Thu, 26 Apr 2012 09:16:52 GMT From: tuSVYNkoKaQai To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/167317: NzZBvSSXtYQG X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 09:20:07 -0000 >Number: 167317 >Category: misc >Synopsis: NzZBvSSXtYQG >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Apr 26 09:20:06 UTC 2012 >Closed-Date: >Last-Modified: >Originator: tuSVYNkoKaQai >Release: rRwjtEXSGTGihCKct >Organization: qZYbnPNhgFSXcnEXe >Environment: Re: Issue: #181There is a pseudo-workaround for this bug.While you caonnt do direct inheritance, you can "clone" the Array prototype and get a mostly functional length property.Code:// create your class MyArray = function(){// instantiates the "length" property so that it is non-enumerable this.push.apply(this,[]); // set the length property to 0, otherwise it is effectively undefined this.length=0; return this; }; // create an explicit list of Array prototype properties to "steal" as you caonnt use for/in loop to retrieve var p=['push','concat'];// manually copy the properties from the Array prototype to MyArray prototype for(var x=0; xDescription: Re: Issue: #181There is a pseudo-workaround for this bug.While you caonnt do direct inheritance, you can "clone" the Array prototype and get a mostly functional length property.Code:// create your class MyArray = function(){// instantiates the "length" property so that it is non-enumerable this.push.apply(this,[]); // set the length property to 0, otherwise it is effectively undefined this.length=0; return this; }; // create an explicit list of Array prototype properties to "steal" as you caonnt use for/in loop to retrieve var p=['push','concat'];// manually copy the properties from the Array prototype to MyArray prototype for(var x=0; xHow-To-Repeat: Re: Issue: #181There is a pseudo-workaround for this bug.While you caonnt do direct inheritance, you can "clone" the Array prototype and get a mostly functional length property.Code:// create your class MyArray = function(){// instantiates the "length" property so that it is non-enumerable this.push.apply(this,[]); // set the length property to 0, otherwise it is effectively undefined this.length=0; return this; }; // create an explicit list of Array prototype properties to "steal" as you caonnt use for/in loop to retrieve var p=['push','concat'];// manually copy the properties from the Array prototype to MyArray prototype for(var x=0; xFix: Re: Issue: #181There is a pseudo-workaround for this bug.While you caonnt do direct inheritance, you can "clone" the Array prototype and get a mostly functional length property.Code:// create your class MyArray = function(){// instantiates the "length" property so that it is non-enumerable this.push.apply(this,[]); // set the length property to 0, otherwise it is effectively undefined this.length=0; return this; }; // create an explicit list of Array prototype properties to "steal" as you caonnt use for/in loop to retrieve var p=['push','concat'];// manually copy the properties from the Array prototype to MyArray prototype for(var x=0; xRelease-Note: >Audit-Trail: >Unformatted: