scala-js/scala-js — pull request #231 by sjrd (2014-02-08 19:44:29+00:00)
Title: Return "undefined" when calling .toString() on JS undefined.

String builders, formatter, and hence string interpolators protect
themselves from `null` and use the string "null" as its
representation for display. But they fail to protect against
`undefined`, the one other JavaScript value on which you cannot
call .toString().

This commit makes the compiler treat Object.toString() specially
so that it will handle `undefined` properly and return the string
"undefined" instead of causing a TypeError. Calling null.toString()
will still cause a TypeError.

This fixes #224.