asmblah/uniter

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

Opened this issue · 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().

In fact:

> typeof Object.toString.toString
'function'

:)

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