>> Class.superclass
=> Module
>> Class.superclass.superclass
=> Object
>> Class.superclass.superclass.class
=> Class
>> Class.superclass.superclass.class.superclass.superclass.class.superclass.superclass.class.superclass.superclass.class.superclass.superclass.class.superclass.superclass.class
=> Class

Andrew

On Sat, Apr 24, 2010 at 6:19 PM, Ben Hoskings <[email protected]> wrote:
> On 24 April 2010 16:11, Ryan Bigg <[email protected]> wrote:
>>
>> What really mind-fucks me about Ruby:
>> the class "Class" is an object of the class "Class" (or so it seems). Yes,
>> you read that right.
>
> Indeed it is.
>>> Object.is_a?(Object)
> => true
>>> Class.is_a?(Class)
> => true
>>> Class.is_a?(Object)
> => true
>>> Object.is_a?(Class)
> => true
> Therefore, everything is everything.
> —ben_h
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rails-oceania?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to