I frequently write something like this:
a_hash[\'x\'] ? a_hash[\'x\'] += \' some more text\' : a_hash[\'x\'] = \'first text\'
There ought to be
The constructor of Hash, in its first argument, have a default value for the keys. This way
>> a_hash = Hash.new "first text" => {} >> a_hash['a'] => "first text" >> a_hash['b'] += ", edit" => "first text, edit"