Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Finding parent-class hierarchy recursively
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="RichardOnRails, post: 4618772"] Thanks, Sebastian! I stupidly failed to recognize that "reverse" would affect each iteration of the recursive routine, rather than merely to last iteration as I intended. I removed the interior "reverse" and the world is beautiful again, to wit: parents(Class).reverse.inspect => [Class, Module, Object] I did know about that, but thanks for asking. I wanted to write my own trace routine so that I have my own insight into metaprogramming techniques and the structure of Ruby. Best wishes, Richard [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Finding parent-class hierarchy recursively
Top