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
meta-class subclass relationships
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="pluskid, post: 4584728"] In fact, currently in ruby: A.metaclass.superclass == A.class.metaclass if you define metaclass as : class Object def metaclass; class << self; self; end; end end That's why you see "$Meta_A.superclass -> #<Class:Class>". Maybe it is not very useful. But it is the case now. And here are some links if you are interested in: * [URL]http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html[/URL] * [URL]http://practicalruby.blogspot.com/2007/02/ruby-metaprogramming-introduction.html[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
meta-class subclass relationships
Top