From: James Edward Gray II Date: 2006-12-04T02:16:47+09:00 Subject: Re: Factory pattern, abstract base class On Dec 3, 2006, at 12:04 AM, Joel VanderWerf wrote: > James Edward Gray II wrote: >> On Dec 2, 2006, at 7:27 PM, Joel VanderWerf wrote: >>> module Foo >>> class Bar >>> def self.new(arg) >>> return super() if self != Foo::Bar >> I don't believe that line does what you intend. Try using your >> code with something like: >> fb = Foo::Baz.new('baz') # => # > > It's a little funny to say "baz" twice, is your point? No. My point was that the original code forces the call to be made on Foo::bar by returning nil otherwise. Your code created the object. James Edward Gray II