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

Module#ancestors now includes singletons themselves #1870

Merged
merged 1 commit into from Nov 2, 2014

Conversation

Projects
None yet
2 participants
@robin850
Copy link
Contributor

commented Jul 29, 2014

Hello,

Since Ruby 2.1, calling #ancestors on a singleton class should now include the class itself in the chain.

Since BasicObject is at the very base of the ancestors, we also need to change the meta class of Object so that BasicObject's singleton class correctly get included in the chain.

This patch has been written by @bbrowning!

Have a nice day!

Module#ancestors now includes singletons themselves
Since Ruby 2.1, calling #ancestors on a singleton class should now
include the class itself in the chain.

Since BasicObject is at the very base of the ancestors, we also need to
change the meta class of Object so that BasicObject's singleton class
correctly get included in the chain.

headius added a commit that referenced this pull request Nov 2, 2014

Merge pull request #1870 from robin850/singleton-ancestors
Module#ancestors now includes singletons themselves

@headius headius merged commit 3f5d6ed into jruby:master Nov 2, 2014

1 check failed

continuous-integration/travis-ci The Travis CI build failed
Details

@headius headius added this to the JRuby 1.7.17 milestone Nov 2, 2014

@headius headius added the core label Nov 2, 2014

@headius headius self-assigned this Nov 2, 2014

@headius

This comment has been minimized.

Copy link
Member

commented Nov 2, 2014

Thanks to you and to @bbrowning!

@robin850

This comment has been minimized.

Copy link
Contributor Author

commented Nov 9, 2014

No problem, happy to contribute ! Just for the record I guess you snuck this pull request in the wrong milestone but there's no big deal ; thanks for merging. :-)

@robin850 robin850 deleted the robin850:singleton-ancestors branch Nov 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.