D
dm1
Hello,
i'm puzzeld by the following piece of code:
$ cat tests.rb
module B
def xx ; puts "in B" ; end
end
module C
def xx ; puts "in C"; end
end
module D
def xx ; puts "in D"; end
end
include B ; xx
include C ; xx
include D ; xx
include B ; xx
include C ; xx
$ ruby ./tests.rb
in B
in C
in D
in D
in D
I expected
in B
in C
in D
in B
in C
looks like include's are made only once.
Is there another way of getting what i expect ?
thanks
Denis
i'm puzzeld by the following piece of code:
$ cat tests.rb
module B
def xx ; puts "in B" ; end
end
module C
def xx ; puts "in C"; end
end
module D
def xx ; puts "in D"; end
end
include B ; xx
include C ; xx
include D ; xx
include B ; xx
include C ; xx
$ ruby ./tests.rb
in B
in C
in D
in D
in D
I expected
in B
in C
in D
in B
in C
looks like include's are made only once.
Is there another way of getting what i expect ?
thanks
Denis