Closed Bug 56878 Opened 24 years ago Closed 24 years ago

ECMA Conformance bug: Object.prototype.toLocaleString() undefined

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: david, Assigned: rogerl)

Details

js 1.5 rc1 does not conform to ECMA V3 15.2.4.3: it does not define Object.prototype.toLocaleString()
Here is the section from the ECMA3 document: 15.2.4.3 Object.prototype.toLocaleString ( ) This function returns the result of calling toString(). NOTE This function is provided to give all Objects a generic toLocaleString interface, even though not all may use it. Currently, Array, Number, and Date provide their own locale-sensitive toLocaleString methods. NOTE The first parameter to this function is likely to be used in a future version of this standard; it is recommended that implementations do not use this parameter position for anything else.
It looks like this was fixed as of Release Candidate 2 (2000-08-11). See: ftp://ftp.mozilla.org/pub/js/js-1.5-rc2.tar.gz (Or check Mozilla mirror sites at http://www.mozilla.org/mirrors.html ) Using Release Candidate 2, and the current trunk of JS, I got this: js> var o = new Object() js> o.toString() [object Object] js> o.toLocaleString() [object Object] js> o.__proto__.toLocaleString() [object Object] js> Object.prototype.toLocaleString() [object Object] A check of the CVS log for jsobj.c shows the change was checked in on 2000-08-09. See rev 3.55 at: http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/js/src/jsobj.c
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Marking Verified -
Status: RESOLVED → VERIFIED
Actually, the js-1.5-rc2 tarball on ftp.mozilla.org does not have this fix in it. In fact, that tarball still reports itself as "pre-release 1". I've downloaded it twice to verify. The version of jsobj.c in the tarball is dated July 21st, so it doesn't include the patch described.
Thank you - I'll see about re-doing the tarball. For Release Candidate 2, what I'm using is a direct CVS pull on this branch: -r JS_150_RC2
You need to log in before you can comment on or make changes to this bug.