Skip to content

Instantly share code, notes, and snippets.

@wmoxam
Created November 3, 2008 16:03
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 wmoxam/21896 to your computer and use it in GitHub Desktop.
Save wmoxam/21896 to your computer and use it in GitHub Desktop.
irb(main):001:0> class Foo
irb(main):002:1> def self.bar; p 'class'; end
irb(main):003:1> end
=> nil
irb(main):008:0> module Foo
irb(main):009:1> def self.bar; p 'module'; end
irb(main):010:1> end
TypeError: Foo is not a module
from (irb):8
irb(main):014:0> module Foo2
irb(main):015:1> def self.bar; p 'module'; end
irb(main):016:1> end
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment