On 3/1/07, Ruby Admirer <ruby_admirer / yahoo.com> wrote:
> >This has changed in 1.9 (or at least as of a few months ago which was the last time I built 1.9)
> >
> >rick@frodo:~$ cat modtest.rb
> >module M
> >end
> >
> >class P
> >include M
> >end
> >
> >class C < P
> >end
> >
> >p C.ancestors
> >
> >class C
> >include M
> >end
> >
> >p C.ancestors
> >
> >rick@frodo:~$ ruby1.8 modtest.rb
> >[C, P, M, Object, Kernel]
> >[C, P, M, Object, Kernel]
> >rick@frodo:~$ ruby1.9 modtest.rb
> >[C, P, M, Object, Kernel, BasicObject]
> >[C, M, P, M, Object, Kernel, BasicObject]
> >
>
>   Thanks for your reply.
>   This is what I expected as this is consistent with the new class var/methods behaviour.

Actually, I just checked out the latest version of the 1.9 trunk code,
and it seems to have gone back:.

rick@frodo:~$ ruby1.9 modtest.rb
[C, P, M, Object, Kernel, BasicObject]
[C, P, M, Object, Kernel, BasicObject]

I'm not sure why, personally I thought that the way 1.9 used to work
was more natural.

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/