Ignore:
Timestamp:
Nov 24, 2009, 6:45:02 PM (16 years ago)
Author:
[email protected]
Message:

2009-11-24 Jason Smith <[email protected]>

Reviewed by Alexey Proskuryakov.

RegExp#exec's returned Array-like object behaves differently from
regular Arrays
https://bugs.webkit.org/show_bug.cgi?id=31689

  • LayoutTests/fast/js/regexp-in-and-foreach-handling.html: Added.
  • LayoutTests/fast/js/script-tests/regexp-in-and-foreach-handling.js: Added.
  • LayoutTests/fast/js/regexp-in-and-foreach-handling-expected.txt: Added.

2009-11-24 Jason Smith <[email protected]>

Reviewed by Alexey Proskuryakov.

RegExp#exec's returned Array-like object behaves differently from
regular Arrays
https://bugs.webkit.org/show_bug.cgi?id=31689

  • JavaScriptCore/runtime/RegExpConstructor.cpp: ensure that undefined values are added to the returned RegExpMatchesArray
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/RegExpConstructor.cpp

    r49365 r51369  
    133133        if (start >= 0)
    134134            JSArray::put(exec, i, jsSubstring(exec, d->lastInput, start, d->lastOvector()[2 * i + 1] - start));
     135        else
     136            JSArray::put(exec, i, jsUndefined());
    135137    }
    136138
Note: See TracChangeset for help on using the changeset viewer.