Summary
RegExp.prototype Symbol methods should accept any object with the corresponding Symbol method, not just RegExp instances.
Why
23 test262 tests fail with "called on non-RegExp object" when passing protocol objects.
Current behavior
RegExp.prototype[Symbol.split].call(protocolObj, str) throws TypeError.
Expected behavior
The method dispatches through the protocol object's Symbol method.
Scope notes
- Relax IsRegExpValue check in Symbol methods while keeping it strict for exec/test
- Goccia.Builtins.GlobalRegExp.pas
Summary
RegExp.prototype Symbol methods should accept any object with the corresponding Symbol method, not just RegExp instances.
Why
23 test262 tests fail with "called on non-RegExp object" when passing protocol objects.
Current behavior
RegExp.prototype[Symbol.split].call(protocolObj, str) throws TypeError.
Expected behavior
The method dispatches through the protocol object's Symbol method.
Scope notes