Skip to content

Instantly share code, notes, and snippets.

@mateuszef
Created June 2, 2016 14:02
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/0f8e373ad9e6770207f10c75e4134b64 to your computer and use it in GitHub Desktop.
Save mateuszef/0f8e373ad9e6770207f10c75e4134b64 to your computer and use it in GitHub Desktop.
[1] pry(main)> module M
[1] pry(main)* end
=> nil
[2] pry(main)> class A
[2] pry(main)* include M
[2] pry(main)* end
=> A
[3] pry(main)> include M
=> Object
[4] pry(main)> A.ancestors
=> [A, M, Object, M, PP::ObjectMixin, Kernel, BasicObject]
[5] pry(main)> module M
[5] pry(main)* end
=> nil
[6] pry(main)> include M
=> Object
[7] pry(main)> class A
[7] pry(main)* include M
[7] pry(main)* end
=> A
[8] pry(main)> A.ancestors
=> [A, Object, M, PP::ObjectMixin, Kernel, BasicObject]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment