On Dec 29, 3:29     
> 2009/12/29 Intransition <transf... / gmail.com>:
>
>
>
> > I would like to use #include at an instance level, such that it
> > behaves just as it does at a class level. After a number of
> > experiments I thought for sure it would work if I ran the include
> > through the object's singleton. Alas, submodules remain inaccessible,
> > eg.
>
> >  > >   > >  > >    > >  
> >  
>
> >   > >  > > class << self; self; end).class_eval do
> >   > >  
> >  
> >    > >   ή >
> Hm, this method above won't work as scope resolution rules for
> constants are different.
>
> >  
>
> >   خͩ
> >   > >     غ >
> > Is there any way to achieve this?
>
> Did you consider using #extend?
>
>   >  >  >  
> end
>
> What do you really want to achieve?    

It's for encapsulating test cases. Eg.

  TestCase.new(SomeClass) do
    ...
  end

Within the test case block it would help to handle #include, to make
tests less verbose.

Instead of making an instance of TestCase for each case, at this point
it looks like I'll have to create a new subclass of it.