From: 7stud -- Date: 2011-05-08T12:34:20+09:00 Subject: Re: Question regarding interaction between modules and classes Geometric Patterns wrote in post #997317: > Hi, Don't EVER use global variables($). module Foo def setup id = self.object_id puts id self.class.class_eval do @foo= id def self.foo @foo end end end def foo return self.class.foo end end class Bar include Foo end bar_one = Bar.new bar_one.setup p bar_one.foo # => 2148224640 bar_two = Bar.new p bar_two.foo # => warning: instance variable @foo not initialized -- Posted via http://www.ruby-forum.com/.