@@ -10,7 +10,7 @@ var createNonEnumerableProperty = require('../internals/create-non-enumerable-pr
10
10
var SPECIES = wellKnownSymbol ( 'species' ) ;
11
11
var RegExpPrototype = RegExp . prototype ;
12
12
13
- module . exports = function ( KEY , length , exec , FORCED , sham ) {
13
+ module . exports = function ( KEY , exec , FORCED , sham ) {
14
14
var SYMBOL = wellKnownSymbol ( KEY ) ;
15
15
16
16
var DELEGATES_TO_SYMBOL = ! fails ( function ( ) {
@@ -63,18 +63,9 @@ module.exports = function (KEY, length, exec, FORCED, sham) {
63
63
}
64
64
return { done : false } ;
65
65
} ) ;
66
- var stringMethod = methods [ 0 ] ;
67
- var regexMethod = methods [ 1 ] ;
68
66
69
- redefine ( String . prototype , KEY , stringMethod ) ;
70
- redefine ( RegExpPrototype , SYMBOL , length == 2
71
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
72
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
73
- ? function ( string , arg ) { return regexMethod . call ( string , this , arg ) ; }
74
- // 21.2.5.6 RegExp.prototype[@@match](string)
75
- // 21.2.5.9 RegExp.prototype[@@search](string)
76
- : function ( string ) { return regexMethod . call ( string , this ) ; }
77
- ) ;
67
+ redefine ( String . prototype , KEY , methods [ 0 ] ) ;
68
+ redefine ( RegExpPrototype , SYMBOL , methods [ 1 ] ) ;
78
69
}
79
70
80
71
if ( sham ) createNonEnumerableProperty ( RegExpPrototype [ SYMBOL ] , 'sham' , true ) ;
0 commit comments