2009/11/2 NachoKB <[email protected]> > ¿Algo así? > > >> a, b = 1, 2 >> => [1, 2] >> >> a, b = [a,b].map { |x| x += 1 } >> => [2, 3] >> > por las dudas que me digas que la x es una variable auxiliar, dejame hacer trampa:
a, b = [a,b].map &:next > nachokb
_______________________________________________ Ruby mailing list [email protected] http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
