Skip to content

Instantly share code, notes, and snippets.

@coffeeaddict
Created July 27, 2011 14:14
Show Gist options
  • Save coffeeaddict/1109439 to your computer and use it in GitHub Desktop.
Save coffeeaddict/1109439 to your computer and use it in GitHub Desktop.
Will it blend?
module Foo
def bar
puts "Hello"
end
class Panel
end
class View < Panel
def foo
bar
end
end
class Pane
end
end
module Other
include Foo
class MyView < View
def quex
p = Pane.new
end
end
end
o = Other::MyView.new
o.quex
# it wil complain that Pane is not available:
# poc.rb:24:in `quex': uninitialized constant Other::MyView::Pane (NameError)
# from poc.rb:30
#
# didn't see that comin'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment