Skip to content

Commit cb96026

Browse files
committedNov 23, 2014
Revert "Add a list of subscribers to method_missing stubs"
We don't need this in a maintenance release. This reverts commit a52e8e8.
1 parent 09ed0af commit cb96026

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed
 

‎opal/corelib/runtime.js

+4-17
Original file line numberDiff line numberDiff line change
@@ -437,31 +437,18 @@
437437
* @param [Array] stubs an array of method stubs to add
438438
*/
439439
Opal.add_stubs = function(stubs) {
440-
var subscribers = Opal.stub_subscribers;
441-
var subscriber;
442-
443440
for (var i = 0, length = stubs.length; i < length; i++) {
444441
var stub = stubs[i];
445442

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);
452446
}
453447
}
454448
};
455449

456450
/*
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
465452
* given name.
466453
*
467454
* @param [Prototype] prototype the target prototype

0 commit comments

Comments
 (0)
Please sign in to comment.