Skip to content

Module#append_features does not detect cyclic include #33

Closed
brixen opened this Issue Oct 7, 2009 · 2 comments

3 participants

@brixen
Rubinius member
brixen commented Oct 7, 2009

Reported by shugo, LH 779.

Module#append_features does not detect cyclic include.

$ cat t.rb          
module A
end

module B
  include A
end

begin
  A.send(:append_features, A)
rescue ArgumentError => e
  p e
end
begin
  B.send(:append_features, A)
rescue ArgumentError => e
  p e
end
p A.ancestors
p B.ancestors
$ ruby -v t.rb 
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
#<ArgumentError: cyclic include detected>
#<ArgumentError: cyclic include detected>
[A, B]
[B, A]
$ rbx -v t.rb
rubinius 0.11.0-dev (1.8.6 8679f8dd 12/31/2009) [i686-pc-linux-gnu]
[A, B, A]
[B, A]
@kronos
Rubinius member
kronos commented Feb 1, 2010
@evanphx
Rubinius member
evanphx commented Feb 3, 2010

Detect cyclic includes properly. Closed by ba1e1ff.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.