From: Andrei Maxim Date: 2007-12-12T09:41:11+09:00 Subject: Re: How To Avoid Ugly Declerations You don't need to define a method for that. foo.each { |word| word.reverse! } should do the trick. On 12/12/07, Michael Boutros wrote: > Hello! More and more I find myself having to do something like this: > > def some_method(foo) > results = [] > foo.each {|f| results << f.reverse} > return results > end > > As you can see, that is some pretty ugly code, but it's also a common > scenario. How can I make it a little less ugly? > > Thanks, > Michael Boutros > -- > Posted via http://www.ruby-forum.com/. > > -- Andrei Maxim http://andreimaxim.ro