Skip to content

Instantly share code, notes, and snippets.

@vireshas
Created June 7, 2018 10:50
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 vireshas/6a34640e66fe6c1b0823f43d034e0f0a to your computer and use it in GitHub Desktop.
Save vireshas/6a34640e66fe6c1b0823f43d034e0f0a to your computer and use it in GitHub Desktop.
use parent's constant
module B
def print
puts C::A
end
end
class C
A = 10
include B
end
puts C.new.print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment