Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Mar 29, 2012
Merged

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

merged 1 commit into from Mar 29, 2012

Conversation

rfb
Copy link

@rfb 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.

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.
han added a commit that referenced this pull request Mar 29, 2012
Prevent bin/stalk from polluting Object with Stalker methods
@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
Labels
None yet
Projects
None yet
2 participants