From: "Brian Schröder" Date: 2005-09-10T19:30:22+09:00 Subject: Re: Dynamic method execution problem > [snip] > begin > my_method = methods.shift > puts "Trying #{my_method}" > send(my_method.to_sym, ie) > rescue UnknownObjectException > retry unless methods.empty? > raise > end You don't need to convert my_method to a symbol explicitly. Just pass it on, and send will handle it on its own. That way you don't take on responsibility for argument checking of send and if somehow send is changed to take something that can not be represented as a symbol - and your code gets feeded with it - the code will continue to work. The send example may be silly because it's unlikely to change, but I think it is a general guideline not to assume too much about the called methods but let the called methods figure it out for themeselves. Also I don't think this is opposed to "fail early" but that would be open to some discussion by people more intelligent than me. best regards, Brian > [snip] > > Jacob Fugal > > -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/