Skip to content

Module#ancestors now includes singletons themselves#1870

Merged
headius merged 1 commit intojruby:masterfrom
robin850:singleton-ancestors
Nov 2, 2014
Merged

Module#ancestors now includes singletons themselves#1870
headius merged 1 commit intojruby:masterfrom
robin850:singleton-ancestors

Conversation

@robin850
Copy link
Contributor

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!

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
Module#ancestors now includes singletons themselves
@headius headius merged commit 3f5d6ed into jruby:master Nov 2, 2014
@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
Copy link
Member

headius commented Nov 2, 2014

Thanks to you and to @bbrowning!

@robin850
Copy link
Contributor Author

robin850 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 singleton-ancestors branch November 9, 2014 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants