Skip to content

Instantly share code, notes, and snippets.

@Aerlinger
Created December 5, 2013 22:08
Show Gist options
  • Save Aerlinger/7814902 to your computer and use it in GitHub Desktop.
Save Aerlinger/7814902 to your computer and use it in GitHub Desktop.
module A
module B; end
module C
puts B
module D
# First looks for A::C::D::B (doesn't exist) then searches for A::B
puts "\nmodule A::C::D"
puts Module.nesting
end
end
end
module A
module B; end
end
module A::C
#B
puts "\nmodule A::C"
puts Module.nesting
end
class A
module B; end
end
class C < A
B == A::B
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment