[Webkit-unassigned] [Bug 17822] New: Checking for myRegExp.compile returns true but myRegExp.compile is undefined

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 13 04:58:09 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=17822

           Summary: Checking for myRegExp.compile returns true but
                    myRegExp.compile is undefined
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mnater at mac.com


This code works as it should IMHO in Safari 3 but is broken in Webkit (Nightly
build):
function test() {
        var myRegExp = new RegExp('man');
        var myString = 'womans';
        document.writeln(myRegExp+' '+myString.match(myRegExp));
        if(myRegExp.compile) {
                myRegExp=myRegExp.compile('mans');
        }
        document.writeln(myRegExp+' '+myString.match(myRegExp));
}
test();

Running the above returns:
/man/ man
undefined null


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list