public void ModuleSingletons1() {
TestOutput(@"
class Class
def self.c_c
:c_c
end
end
class Module
def self.c_m
:c_m
end
end
module M
class << self
$SM = self
end
end
$SM.method(:c_c) rescue p $!
$SM.c_c rescue p $!
p $SM.c_m
", @"
#<NameError: undefined method `c_c' for class `Class'>
#<NoMethodError: undefined method `c_c' for #<Class:M>>
:c_m
");
}