Skip to content

Instantly share code, notes, and snippets.

@nashby
Last active April 5, 2018 08:38
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 nashby/81e3ab989d2548032e54b140249dffcb to your computer and use it in GitHub Desktop.
Save nashby/81e3ab989d2548032e54b140249dffcb to your computer and use it in GitHub Desktop.
module Empty; end
class Foo
singleton_class.prepend(Empty)
def self.foo; end
end
Foo.singleton_methods(:false) # => [:foo]
Foo.singleton_method(:foo) # => NameError (undefined singleton method `foo' for `Foo')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment