From: Todd Benson Date: 2008-03-12T14:09:19+09:00 Subject: Re: shortcut for x = unless x.is_a?(Array) On Tue, Mar 11, 2008 at 11:37 AM, Todd Benson wrote: > On Tue, Mar 11, 2008 at 5:30 AM, Paul Mckibbin wrote: > > > > > puts "Array[#{x.inspect}] gives #{Array[x].inspect}" > > > #added this ^^^^^^ one > > > puts '============================' > > > end > > > > > > Todd > > > > Hi Todd, > > > > Array[x] is equivalent to [x]. > > Hi, > > I know that now. Just wanted to make sure. Thanks. I think in my head I was thinking of something different anyway... x = [*x] ...which behaves the same as Array(x), except for x = nil, where it behaves like [x]. Todd