|Summary:||ES6 Change: Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts \b and \B|
|Product:||WebKit||Reporter:||Michael Saboff <msaboff>|
|Severity:||Normal||CC:||commit-queue, keith_miller, mark.lam, mathias, sbarati, webkit-bug-importer|
Description Michael Saboff 2016-06-07 17:37:39 PDT
At the May 2016 TC-39 meeting, it was agreed that we should make slight changes to the way CharacterClassEscapes \w and \W work with case insensitive unicode regular expressions. As part of that change, it was agreed that the \b and \B Word Assertions would be aligned with \w and \W. The resolution is to have the \w CharacterClass in a unicode, case insensitive RegExp (ui flags) includes lower case and upper case ASCII letters, digits 0 through 9, underscore (_), and the two Unicode characters Small Latin Sharp S (\u017f) and the Kelvin sign (\u212a). The \W CharacterClass in a unicode, case insensitive RegExp includes all the characters not in the \w CharacterClass. The \b and \B Word Assertions for unicode, case insensitive RegExp should track what is going on for \w & \W. The discussion can be found at: https://github.com/tc39/ecma262/pull/525
Comment 3 Geoffrey Garen 2016-06-08 13:57:08 PDT
Comment on attachment 280755 [details] Patch r=me Will this cause some apparent failures in the kangax or ECMA test suites? If so, I think we should hold off until the tests are updated.
Comment 4 Michael Saboff 2016-06-08 14:29:17 PDT
(In reply to comment #3) > Comment on attachment 280755 [details] > Patch > > r=me > > Will this cause some apparent failures in the kangax or ECMA test suites? If > so, I think we should hold off until the tests are updated. It does cause a kangax failure. I fully expect that is also causes a test262 failure. I'll hold off landing until the spec is updated as well as the tests.
Comment 5 Michael Saboff 2016-06-24 17:15:52 PDT
*** Bug 159055 has been marked as a duplicate of this bug. ***
Comment 6 Mathias Bynens 2016-06-25 02:44:11 PDT
https://github.com/tc39/ecma262/pull/525 was merged. New expectations: /\w/iu.test('\u017F') // true /\w/iu.test('\u212A') // true /\W/iu.test('\u017F') // false /\W/iu.test('\u212A') // false /\W/iu.test('s') // false /\W/iu.test('S') // false /\W/iu.test('K') // false /\W/iu.test('k') // false
Comment 7 Michael Saboff 2016-06-27 10:39:14 PDT
Committed r202490: <http://trac.webkit.org/changeset/202490>