Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubysingleton eigenclassSingle-choice MCQ

Why is `B.cm` callable below, and what does the singleton-class chain look like?

class A def self.cm; "A.cm"; end end class B < A; end B.cm # works; why? B.singleton_class.ancestors.include?(A.singleton_class) # ?