As David said, the constant accessed in whatever class is specified by the class...end block you're currently in. Example: class Moo; MOO = 'hi' end class Foo; MOO = 'burp' end class Foo def Moo.greet; p MOO end end class Moo def Moo.bark; p MOO end end irb(main):009:0> Moo.bark "hi" irb(main):010:0> Moo.greet "burp" Constants share this property with class variables. So, if you want to inject a factory into your class, you're going to have to use a different method, or play around with const_set. Devin