On 8/24/07, John Dearden <john.dearden / earthlink.net> wrote: > Logan Capaldo wrote: > > or you can return more than one value > > > > def munge(a, b) > > return a + 1, b - 2 > > end > > > > q = 4 > > r = 9 > > > > q, r = munge(q, r) > > Ah, well, now we're on to something! It looks a bit clunky to my > untrained eye, but it will definitely do the job, and honors the Ruby > 'local variables are local' way. > You're right it does look a little clunky, but I doubt your problem is so mundane in reality. (And I suspect ultimately there's a better solution than out / ref vars or multiple returns for your actual problem. But since we don't know what that is, we can't help :) ) > Thanks! > John > > -- > Posted via http://www.ruby-forum.com/. > >