Skip to content

Instantly share code, notes, and snippets.

@teamon
Created February 20, 2014 12:53
Show Gist options
  • Save teamon/9112845 to your computer and use it in GitHub Desktop.
Save teamon/9112845 to your computer and use it in GitHub Desktop.
irb(main):010:0> class A; def dupa(x); x; end; end
=> nil
irb(main):012:0> module Over; def dupa(x); x + 1; end; end
=> nil
irb(main):013:0> A.new.dupa(1)
=> 1
irb(main):014:0> A.new.extend(Over).dupa(1)
=> 2
irb(main):015:0> class B; def self.dupa(x); x; end; end
=> nil
irb(main):016:0> B.dupa(1)
=> 1
irb(main):017:0> B.extend(Over).dupa(1)
=> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment