From: Eero Saynatkari Date: 2006-08-29T08:15:47+09:00 Subject: Re: Partial append_features? Robert Dober wrote: > On 8/28/06, Logan Capaldo wrote: >> > module Foo >> > end >> > the UnboundMethod instance_method from the Module, but I couldn't >> > "Yields falsehood when quined" yields falsehood when quined. >> include mod >> >> a.b >> a.a >> >> % ruby Projects/Ruby Experiments/append_from.rb >> b >> -:40: undefined method `a' for # (NoMethodError) >> >> >> >> >> > unfortunately that approach undefines eralier defined methods in the > appendee, especially inherited ones :( > I guess that could be fixed but the code will become rather clumsy. Heh, take another look: new_mod = Module.new # Only this anonymous is affected new_mod.module_eval do include mod methods_to_remove.each { |meth| undef_method meth } end A rather nice solution. > Cheers > Robert -- Posted via http://www.ruby-forum.com/.