Skip to content

Instantly share code, notes, and snippets.

@statonjr
Created September 20, 2010 19:03
Show Gist options
  • Save statonjr/588447 to your computer and use it in GitHub Desktop.
Save statonjr/588447 to your computer and use it in GitHub Desktop.
class Object
def descendants
descendants = []
descendants << self.superclass
descendants.each do |klass|
descendants << klass.superclass if klass != BasicObject
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment