Bug 24716

Summary: typeof regexp returns function
Product: WebKit Reporter: Peter Kim <raingrove>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.5   

Description Peter Kim 2009-03-20 03:14:53 PDT
typeof /someregexp/ returns 'function'.

expected value is 'regexp'

in firefox, 'object' is returned.
Comment 1 Peter Kim 2009-03-20 06:36:57 PDT
looks like the consensus is that it should return 'object'

see discussion in mozilla bugzilla:

https://bugzilla.mozilla.org/show_bug.cgi?id=61911
Comment 2 Cameron Zwarich (cpst) 2009-03-20 08:18:07 PDT
Ironically, this was originally done for compatibility with Mozilla. Bug 22082 suggests that we should change it back.

*** This bug has been marked as a duplicate of 22082 ***