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="David A. Black, post: 4584742"] Hi -- It will be :-) It worked in 1.8.2, doesn't work in 1.8.6, works again in 1.9. I don't know what the rationale was for changing the model, but it's changed back. rubypal:~$ cat super.rb class Object def singleton_class class << self; self; end end end p String.singleton_class.superclass == Object.singleton_class rubypal:~$ /usr/local/lib/ruby-1.8.2/bin/ruby -v super.rb ruby 1.8.2 (2004-12-25) [i686-linux] true rubypal:~$ ruby -v super.rb ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] false rubypal:~$ /usr/local/lib/ruby-svn/bin/ruby -v super.rb ruby 1.9.0 (2007-11-07 patchlevel 0) [i686-linux] true David [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
meta-class subclass relationships
Top