2 var hide = require('./_hide')
3 , redefine = require('./_redefine')
4 , fails = require('./_fails')
5 , defined = require('./_defined')
6 , wks = require('./_wks');
8 module.exports = function(KEY, length, exec){
10 , fns = exec(defined, SYMBOL, ''[KEY])
15 O[SYMBOL] = function(){ return 7; };
16 return ''[KEY](O) != 7;
18 redefine(String.prototype, KEY, strfn);
19 hide(RegExp.prototype, SYMBOL, length == 2
20 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
21 // 21.2.5.11 RegExp.prototype[@@split](string, limit)
22 ? function(string, arg){ return rxfn.call(string, this, arg); }
23 // 21.2.5.6 RegExp.prototype[@@match](string)
24 // 21.2.5.9 RegExp.prototype[@@search](string)
25 : function(string){ return rxfn.call(string, this); }