Skip to content

Instantly share code, notes, and snippets.

@chad
Created July 8, 2009 14:13
Show Gist options
  • Save chad/142872 to your computer and use it in GitHub Desktop.
Save chad/142872 to your computer and use it in GitHub Desktop.
class A
end
class B < A
end
module X
end
A.send(:include, X)
p A.ancestors
# [A, X, Object, Kernel]
B.send(:include, X)
p B.ancestors
# [B, A, X, Object, Kernel]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment