Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@trydionel
Created July 24, 2010 16:28
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 trydionel/488793 to your computer and use it in GitHub Desktop.
Save trydionel/488793 to your computer and use it in GitHub Desktop.
class SuperClass
def run
return "foo"
end
end
class SubClass < SuperClass
def run
super
return "bar"
end
end
puts SubClass.new.run
# Prints "bar". I expected "foo".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment