From: Trans Date: 2006-12-28T01:39:45+09:00 Subject: Re: Using an UnboundMethod instead of an alias to redefine a method Mauricio Fernandez wrote: > > That technique is fairly old (I myself tried to popularize it a few years > ago). It's cleaner & generally safer than alias_method, but there are three > shortcomings: > * the environment captured by the closure is often too heavy (extra care > needed to get rid of unwanted references is needed) > * a method defined with define_method+block cannot take a block under 1.8 > (it's possible in 1.9, though) > * method calls are much slower > > [1] some other examples > http://thekode.net/ruby/techniques/CapturingMethods.html (* Trans still patiently awaits Cuts *) T.