...error: Call to undefined method JSObject::__toString()
Opened this issue · 2 comments
IngwiePhoenix commented
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 commented
In fact:
> typeof Object.toString.toString
'function'
:)
asmblah commented
Thanks for raising this @IngwiePhoenix, it's on my list 😄