From: Intransition Date: 2011-06-11T02:08:37+09:00 Subject: Re: a little challenge - reproduce this error On Jun 9, 1:22 pm, John Feminella wrote: > > I realize now maybe how I should have phrased this as a challenge > > >    module X > >      class Foo > >        def call > >          X > >        end > >      end > >    end > > > Change one line of this code to cause this error: > > >  uninitialized constant X::Foo::X (NameError) > > > and without directly calling #raise. > > Just to be clear, do you mean "without invoking #call" (as in, pasting > this into irb should raise the error), or is the intention that #call > will be invoked? When #call is invoked, the error is raised. So yea, guess I should have added: X::Foo.new.call