mishoo/UglifyJS2 — pull request #181 by Candid (2013-04-04 02:47:02+00:00)
Title: Fix typeof evaluation for regex and function

Currently `typeof /./` evaluates to specific string (on node it evaluates to "object"). This is incorrect since RegExp can be either "object" or "function" depending on whether or not it implements [[Call]]. This in particular breaks underscore's _.isFunction() on the platforms where RegExp is a function: https://github.com/documentcloud/underscore/blob/master/underscore.js#L992

Also, `typeof function(){}` currently evaluate to "object", which is obviously incorrect.

This PR fixes both issues.