[#3479] Missing .document files for ext/ libraries — Brian Candler <B.Candler@...>

The ri documentation for zlib, strscan and iconv doesn't get built by 'make

12 messages 2004/10/06

[#3492] Re: ANN: Free-form-operators patch — Markus <markus@...>

> In message "Re: ANN: Free-form-operators patch"

15 messages 2004/10/11
[#3493] Re: ANN: Free-form-operators patch — Yukihiro Matsumoto <matz@...> 2004/10/11

Hi,

[#3495] Re: ANN: Free-form-operators patch — Markus <markus@...> 2004/10/12

On Mon, 2004-10-11 at 16:16, Yukihiro Matsumoto wrote:

[#3561] 1.8.2 - what can we do to help? — Dave Thomas <dave@...>

Folks:

23 messages 2004/10/26
[#3562] Re: 1.8.2 - what can we do to help? — Yukihiro Matsumoto <matz@...> 2004/10/27

Hi,

Including a module twice

From: Peter <Peter.Vanbroekhoven@...>
Date: 2004-10-31 23:47:00 UTC
List: ruby-core #3672
I know Ruby tests whether a module is already included, and doesn't
include it again when it was included already. However the following code
circumvents that check (swap the two includes and Ruby does catch it):

  class A
    def m ; super if defined? super ; end
  end

  class B < A
    def m ; super if defined? super ; end
  end

  module M
    def m ; super if defined? super ; end
  end

  class B
    include M
  end

  class A
    include M
  end

  B.new.m

This is not a big problem I guess (except that order matters while maybe
it shouldn't), but the bigger problem is that a call to B#m goes in an
infinite loop. I constructed the above test case when I noticed a possible
problem in the Ruby source, so I know why it happens; I'm just wondering
whether it is considered a known issue not worth solving. I guess it may
not be that common to call super in a module, but we are using this for
AOP and there it does happen. (Though I'm not sure the double include
would occur.)

Peter

In This Thread

Prev Next