From: Gavin Kistner Date: 2006-09-09T01:29:57+09:00 Subject: Re: [CHALLENGE] better alias_method From: ara.t.howard@noaa.gov [mailto:ara.t.howard@noaa.gov] > i remember that define_method will soon have the ability to > define methods that take blocks do you know if that's in > 1.8.5 or the 1.9 branch? Not in 1.8.5: p RUBY_VERSION #=> 1.8.5 class Foo def self.make_method( name, &block ) define_method( name, &block ) end end Foo.make_method( :bar ){ |a| p a, block_given? yield a if block_given? } f = Foo.new f.bar( 3 ){ |x| p x*x } #=> 3 #=> false