uniter icon indicating copy to clipboard operation
uniter copied to clipboard

...error: Call to undefined method JSObject::__toString()

Open IngwiePhoenix opened this issue 8 years ago • 2 comments

Actually, this is not quite right. Each JavaScript object has a .toString() method.

> typeof Object.toString
'function'
> typeof Number.toString
'function'
> typeof "abc".toString
'function'
> typeof (1).toString
'function'
> typeof (1.2).toString
'function'
> typeof /.+/.toString
'function'

Suggestion: JSObject::__toString() should map 1:1 to (...).toString().

IngwiePhoenix avatar Mar 12 '16 21:03 IngwiePhoenix

In fact:

> typeof Object.toString.toString
'function'

:)

IngwiePhoenix avatar Mar 12 '16 21:03 IngwiePhoenix

Thanks for raising this @IngwiePhoenix, it's on my list 😄

asmblah avatar Oct 03 '17 22:10 asmblah