From: Suraj Kurapati Date: 2007-12-12T09:41:23+09:00 Subject: Re: How To Avoid Ugly Declerations Michael Boutros wrote: > 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? def some_method foo foo.map {|f| f.reverse} end -- Posted via http://www.ruby-forum.com/.