Prevent bin/stalk from polluting Object with Stalker methods #6

Merged
merged 1 commit into from Mar 29, 2012

Projects

None yet

2 participants

rfb commented Mar 28, 2012

Calling 'include Stalker' in the context of main (which is an instance
of Object) also extends Object with the class/instance methods from
Stalker, which basically pollutes all objects in an application.

Here is a gist which demonstrates the behaviour:

https://gist.github.com/2231315

And this ticket which is probably related:

adamwiggins#14

Calling 'extend Stalker' works on the instance of the current object.
When used in the context of main, all the methods from Stalker are
loaded and the global Object isn't polluted.

@rfb rfb Change 'include Stalker' to 'extend' in bin/stalk
Calling 'include Stalker' in the context of main (which is an instance
of Object) also extends Object with the class/instance methods from
Stalker, which basically pollutes all objects in an application.

Here is a gist which demonstrates the behaviour:

https://gist.github.com/2231315

And this ticket which is probably related:

adamwiggins#14

Calling 'extend Stalker' works on the instance of the current object.
When used in the context of main, all the methods from Stalker are
loaded and the global Object isn't polluted.
d14af56
@han han merged commit 8966206 into han:master Mar 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment