Skip to content

Instantly share code, notes, and snippets.

@agrimm
Forked from kunzmann/gist:1471853
Created December 13, 2011 12:04
Show Gist options
  • Save agrimm/1471899 to your computer and use it in GitHub Desktop.
Save agrimm/1471899 to your computer and use it in GitHub Desktop.
super from ROROsyd
module Baz
def hello
puts "Baz#hello called"
super
end
end
class Foo
def hello
puts "Foo#hello called"
super
end
include Baz
end
Foo.new.hello
Foo#hello called
Baz#hello called
NoMethodError: super: no superclass method `hello' for #<Foo:0x000001010159a8>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment