Skip to content

Instantly share code, notes, and snippets.

@mateuszef
Last active June 2, 2016 13:57
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 mateuszef/a6a21119f9d886a8f416fb3d43053298 to your computer and use it in GitHub Desktop.
Save mateuszef/a6a21119f9d886a8f416fb3d43053298 to your computer and use it in GitHub Desktop.
Module included twice in ancestor list
module M
end
class A
include M
end
include M
puts A.ancestors.map { |con| con.object_id.to_s + ' ' + con.name}
Output:
46946332941400 A
46946332941440 M
46946332046900 Object
46946332941440 M
46946332046740 Kernel
46946332046940 BasicObject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment