On Sat, Mar 7, 2009 at 9:48 PM, Phlip <phlip2005 / gmail.com> wrote: > Rubies: > > Here's a ragged array: > > ¨Â ¨Â> [ 2, 3 ], > [ 4 ¨Â> [ 5, 6 ], > [ 7 ¨Â> [ 8 ¨Â > > How, with the tightest, or most modern, or coolest statements, can we turn > it into this? > > ¨Â ±¬ ݬ > [ 2, 3 ], > [ 4, 4 ], > [ 5, 6 ], > [ 7, 7 ], > [ 8, 8 ] ] a.each {|i| i[1] ||= i[0]} martin