DmitryBaranovskiy/raphael — pull request #573 by hitsthings (2012-05-14 23:15:17+00:00)
Title: Fix issue with clone() that causes errors in browsers where a function's...

... prototype is an enumerable property (e.g., FF3.6).

pathClone() calls clone() on an object after .toString has been overwritten as R._path2string

clone attempts to recursively clone obj.toString (hereafter 'func') as an object, because Object(func) === func.

It then recursively attempts to clone func.prototype, which makes a call to "new obj.constructor" (aka func itself since func.prototype.constructor === func).

since _path2string contains the code "this.join", it fails when called as a constructor (Objects don't by default have a join property).

You should test this change before merging it - Though I have tested the change fixes my problem, I am not in a place to know all the ramifications of changing the clone function.