From: ts Date: 2002-09-24T17:54:00+09:00 Subject: Re: alias/method redfinition >>>>> "a" == ara howard writes: a> so, in general, extending an object always results in a new proxy a> class being created as the first one to be searched in the inheritence a> hierarchy, second one : first ruby create a singleton class for example pigeon% cat b.rb #!/usr/bin/ruby class A def a p "class A" end end module M def a p "module M" super end end a = A.new a.extend M class << a def a p "singleton class" super end end a.a pigeon% pigeon% b.rb "singleton class" "module M" "class A" pigeon% a> and because mutiply extending an object with a module would a> result in duplicate classes being created in the inheritence tree ruby a> protects against this by a> not allowing 'extend M' to happen more than once? yes, Guy Decoux