Skip to content

Instantly share code, notes, and snippets.

@kunzmann
Forked from agrimm/gist:1471685
Created December 13, 2011 11:50
Show Gist options
  • Save kunzmann/1471853 to your computer and use it in GitHub Desktop.
Save kunzmann/1471853 to your computer and use it in GitHub Desktop.
super from ROROsyd
module Baz
def hello
"baz " + super
end
end
module Bar
def hello
"bar "
end
end
class Foo
include Bar
include Baz
end
Foo.new.hello # => "baz bar "
# vs
module Baz
def hello
"baz " + super
end
end
class Foo
def hello
"bar "
end
include Baz
end
Foo.new.hello # => "bar "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment