-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve RegExp.prototype[@@replace] coverage #2481
Improve RegExp.prototype[@@replace] coverage #2481
Conversation
a90e2b8
to
447837e
Compare
features: [Symbol.replace] | ||
---*/ | ||
|
||
var r = /./; | ||
var coercibleValue = { | ||
length: 4, | ||
index: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing on JSC because it doesn't coerce index
properly.
}, | ||
0: '', | ||
1: 'foo', | ||
2: 'bar', | ||
3: 'baz' | ||
3: 'baz', | ||
index: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing on JSC because it doesn't coerce index
properly.
throw new Test262Error('This method should not be invoked.'); | ||
}, | ||
}, | ||
index: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing on JSC because it doesn't coerce index
properly.
}; | ||
r.exec = function() { | ||
return coercibleIndex; | ||
}; | ||
|
||
assert.sameValue(r[Symbol.replace]('abcd', ''), 'ab'); | ||
var replacer = function(_matched, position) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was not failing on JSC even though it doesn't coerce index
to integer.
@shvaikalesh Thanks for the extra notes! |
447837e
to
7a3b8f7
Compare
|
JSC bugs:
See also #2426.