Skip to content

Instantly share code, notes, and snippets.

@edisonywh
Created November 9, 2018 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edisonywh/f2f97a30c5f24bb6a4e8f93e55c9be2b to your computer and use it in GitHub Desktop.
Save edisonywh/f2f97a30c5f24bb6a4e8f93e55c9be2b to your computer and use it in GitHub Desktop.
HiddenModule = Module.new
class Foo
extend HiddenModule
end
Foo.singleton_class.ancestors #=> [#<Class:Foo>, HiddenModule, #<Class:Object>, #<Class:BasicObject>, Class, Module, Object, Kernel, BasicObject]
# Well HiddenModule is not so hidden anymore!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment