-
-
Save nashby/81e3ab989d2548032e54b140249dffcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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