From: fkocherga Date: 2009-12-30T11:04:07+09:00 Subject: Re: Using #include at the instance level? --Apple-Mail-256-363620900 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii >=20 > AFAIK it hasn't changed and your code could never work in any version > of Ruby because the const lookup in method #n is done _statically_. But it should not, consider: module M module N end end #Class.new do <---- This does not work in 1.8.7! class B < Object=20 include M N end When 'class B < Object' replaced with 'Class.new do' the Ruby 1.8.7 = interpreter complains about uninitialized constant N. What is the big = reason for dynamically defined class to behave so differently? It would = be very non obvious and unexpected behavior. Actually both cases work as = expected in Ruby 1.9.1 and this is correct behavior according to the = Ruby Draft.=20 -- Fedor Kocherga http://sidenotes.kocherga.info/ --Apple-Mail-256-363620900--