vitebonus / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

Object.clone fails to set toString on IE8 #539

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?
goog.net.IpAddress.fromString('127.0.0.1').toInteger().toString('2')

What is the expected output? What do you see instead?
Expected: "1111111000000000000000000000001"
Result:   "[object Object]"

What version of the product are you using? On what operating system?
master/HEAD on IE8 (Windows XP) (https://github.com/xdissent/ievms)

Please provide any additional information below.
https://github.com/documentcloud/underscore/issues/60
In particular, this is a big issue for closure-library since the toString 
function is available in quite a few places.

Note: we cannot accept patches without the contributor license agreement
being signed. See http://code.google.com/p/closure-
library/wiki/Contributors for more info.

Original issue reported on code.google.com by jordo...@gmail.com on 16 Feb 2013 at 2:31

GoogleCodeExporter commented 8 years ago
On further investigation, this should just be a change to IpAddress.toInteger : 
it should use goog.object.extend({}, ...) rather than goog.object.clone(...). 
Similar methods elsewhere should also be corrected in this fashion.

Original comment by jordo...@gmail.com on 18 Feb 2013 at 7:42