From: Adam Block Date: 2007-01-21T02:55:48+09:00 Subject: Proper way to either create or append to an array? Hi all. Let's say I want to either create a new named array or append to that array if it already exists. Is there a more elegant way of doing the following? >> @foo[:bar].nil? ? foo[:bar] = ["snafu"] : foo[:bar] << "snafu" Thanks! /afb -- Posted via http://www.ruby-forum.com/.