Skip to content

Instantly share code, notes, and snippets.

@yitsushi
Created September 13, 2010 12:54
Show Gist options
  • Save yitsushi/577243 to your computer and use it in GitHub Desktop.
Save yitsushi/577243 to your computer and use it in GitHub Desktop.
class AppleTree
def initialize
puts "OMG! /root"
end
end
module NS
class AppleTree
def initialize
puts "ROFL /root/NS"
end
end
class CallAppleTree
def initialize
AppleTree.new
end
end
class CallRootAppleTree
def initialize
::AppleTree.new
end
end
end
AppleTree.new
NS::AppleTree.new
NS::CallAppleTree.new
NS::CallRootAppleTree.new
=begin
Output:
=======
OMG! /root
ROFL /root/NS
ROFL /root/NS
OMG! /root
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment