Skip to content

Instantly share code, notes, and snippets.

@nusco
Created August 18, 2010 12:07
Show Gist options
  • Save nusco/534477 to your computer and use it in GitHub Desktop.
Save nusco/534477 to your computer and use it in GitHub Desktop.
Post: "Why Inheritance Sucks"
class Bird
def fly
"Wheee!"
end
end
class Duck < Bird
end
donald = Duck.new
donald.fly # => "Wheee!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment