From: Gavin Kistner Date: 2006-12-12T07:19:01+09:00 Subject: Re: best way to dynamically create new instance methods From: James Edward Gray II [mailto:james@grayproductions.net] > Sent: Monday, December 11, 2006 3:15 PM > To: ruby-talk ML > Subject: Re: best way to dynamically create new instance methods > >> def create_method(name) > >> class << self; self end.send(:define_method, name) { |*args| > args.first } > >> end Ooh, look at Mr. Fancy Pants, using his fancy #send to get around private methods. :) Really, I'm writing this email not to praise or make fun, but to point out that the above technique may not work when 1.9 rolls around. (Assuming I remember correctly that 1.9 will/may change so that #send honors the public/protected/private state of the method being invoked.)