From: Christian Neukirchen Date: 2005-01-09T20:04:20+09:00 Subject: Re: Construct [*nil] works differently in 1.6 and 1.8 Pit Capitain writes: > Hi Gennady, > > you can use the method "Array": > > p Array( [ 1, 2, 3, ] ) > p Array( "x" ) > p Array( nil ) > > results in > > [1, 2, 3] > ["x"] > [] > > Regards, > Pit Hello, do you maybe also know a nice trick to make it a single-element Array iff it's not already an Array? irb(main):001:0> Array("foo\nbar") => ["foo\n", "bar"] This "feature" gives me the creeps. Christian Neukirchen