File tree 1 file changed +4
-17
lines changed
1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change 437
437
* @param [Array] stubs an array of method stubs to add
438
438
*/
439
439
Opal . add_stubs = function ( stubs ) {
440
- var subscribers = Opal . stub_subscribers ;
441
- var subscriber ;
442
-
443
440
for ( var i = 0 , length = stubs . length ; i < length ; i ++ ) {
444
441
var stub = stubs [ i ] ;
445
442
446
- for ( var j = 0 ; j < subscribers . length ; j ++ ) {
447
- subscriber = subscribers [ j ]
448
- if ( ! subscriber [ stub ] ) {
449
- subscriber [ stub ] = true ;
450
- add_stub_for ( subscriber , stub ) ;
451
- }
443
+ if ( ! BasicObject . prototype [ stub ] ) {
444
+ BasicObject . prototype [ stub ] = true ;
445
+ add_stub_for ( BasicObject . prototype , stub ) ;
452
446
}
453
447
}
454
448
} ;
455
449
456
450
/*
457
- * Keep a list of prototypes that want method_missing stubs to be added.
458
- *
459
- * @default [Prototype List] BasicObject.prototype
460
- */
461
- Opal . stub_subscribers = [ BasicObject . prototype ]
462
-
463
- /*
464
- * Actually add a method_missing stub function to the given prototype for the
451
+ * Actuall add a method_missing stub function to the given prototype for the
465
452
* given name.
466
453
*
467
454
* @param [Prototype] prototype the target prototype
You can’t perform that action at this time.
0 commit comments