From: Mark Hahn Date: 2001-11-01T02:27:22+09:00 Subject: [ruby-talk:23989] Re: Overiding a method in another module Thanks. I like this solution more then the eval solution. I suspect that anything is possible in Ruby. -----Original Message----- From: ts [mailto:decoux@moulon.inra.fr] Sent: Wednesday, October 31, 2001 9:18 AM To: ruby-talk ML Cc: ruby-talk@ruby-lang.org Subject: [ruby-talk:23988] Re: Overiding a method in another module >>>>> "M" == Mark Hahn writes: M> I implemented the following. I think it matches your suggestion. It didn't M> work: Try this pigeon% cat b.rb #!/usr/bin/ruby module M1 class C1 def m_1 p '1' end end end include M1 module M2 C1 = Object::M1::C1 class C1 def m_2 p '2' end def m_1 p '4' end end end C1.new.m_2 C1.new.m_1 pigeon% pigeon% b.rb "2" "4" pigeon% Guy Decoux