Skip to content

Instantly share code, notes, and snippets.

@drio
Created November 7, 2008 21:14
Show Gist options
  • Save drio/22967 to your computer and use it in GitHub Desktop.
Save drio/22967 to your computer and use it in GitHub Desktop.
module M2
def m2_meth
puts "m2_meth"
end
def rufus
self.stuff
end
end
module M1
include M2
def m1_meth
puts "m1_meth"
end
end
class C
include M1
attr_reader :stuff
def initialize
@stuff = 'a'
end
end
puts "-> " + C.new.rufus
# -> a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment