| Index: src/regexp.js
|
| diff --git a/src/regexp.js b/src/regexp.js
|
| index a574f62bf6a040b808bc40ea380f8a497f2261fe..44f8dd1234d9055afecd6be061839725b65f7d7d 100644
|
| --- a/src/regexp.js
|
| +++ b/src/regexp.js
|
| @@ -278,6 +278,10 @@ function TrimRegExp(regexp) {
|
|
|
|
|
| function RegExpToString() {
|
| + if (!IS_REGEXP(this)) {
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ['RegExp.prototype.toString', this]);
|
| + }
|
| var result = '/' + this.source + '/';
|
| if (this.global) result += 'g';
|
| if (this.ignoreCase) result += 'i';
|
|
|