{ "id": "143673", "key": "TIMOB-18475", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2015-01-29T09:46:18.000+0000", "priority": null, "labels": [ "ios", "ios-jscore", "kroll" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:51.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "{code:javascript}\r\nprintPropertyDescriptor(String, 'format');\r\n\r\nString.format = 42;\r\n\r\nconsole.log(\"String.format = \" + String.format);\r\n\r\nfunction printPropertyDescriptor(obj, name) {\r\n\tvar descriptor = Object.getOwnPropertyDescriptor(obj, 'clearTimeout');\r\n\tvar formatted = JSON.stringify(descriptor, null, 2);\r\n\tconsole.log(name + \" = \" + formatted);\r\n}\r\n{code}\r\n\r\nExpected result:\r\n\r\n{code}\r\n[INFO] : format = { …some flags here… }\r\n[INFO] : String.format = 42\r\n{code}\r\n\r\nActual result:\r\n\r\n{code}\r\n[INFO] : format = undefined\r\n[INFO] : String.format = function format() {\r\n[INFO] : [native code]\r\n[INFO] : }\r\n{code}", "attachment": [], "flagged": false, "summary": "String.format is not overwritable, nor inspectable", "creator": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 3.5.0, iOS", "comment": { "comments": [ { "id": "341142", "author": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "body": "Here’s the culprit: https://github.com/appcelerator/titanium_mobile/blob/2c7f6fb74fa772e1ecc8d9d5209f83c4a0c06aab/iphone/Classes/KrollContext.m#L1203", "updateAuthor": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-01-29T10:06:39.000+0000", "updated": "2015-01-29T10:06:39.000+0000" }, { "id": "341143", "author": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "body": "This issue can be extended to include {{String.format}}, {{String.formatDate}}, {{String.formatTime}}, {{String.formatDecimal}} and {{String.formatCurrency}}.", "updateAuthor": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-01-29T10:07:29.000+0000", "updated": "2015-01-29T10:09:05.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }