Module#parent is defined in introspection.rb as
def parent
parent_name = name.split('::')[0..-2] * '::'
parent_name.empty? ? Object : parent_name.constantize
end
And dependencies.rb defines Class#const_missing as
def const_missing(class_id)
if [Object, Kernel].include?(self) || parent == self
super
end
...
end
If the || is not redundant there has to be a self different from
Object whose parent is himself, but I can't figure out an example.
Just to understand that line, is there any?
-- fxn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" 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/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---