From: Tim Wolak Date: 2008-05-08T03:25:29+09:00 Subject: Re: hash adding values Sebastian Hungerecker wrote: > Tim Wolak wrote: >> Is there a reason this is not >> working? >> >> sktylist = Hash.new("") >>             sktylist[@acctnum] += [value] >>          p sktylist > > Yes, there is: String#+ does not expect an array as an argument. > sktylist[@acctnum] += value would work if value is a string. > (Alternatively you could change the hash to hold arrays instead > of strings and keep the += [value] part as-is, if that's what > you want). > > > HTH, > Sebastian So would it be easier converting it to a string or have the hash hold arrays? All I need is the value to be an array? Is there an easy way to do this? Thanks for the help. Tim -- Posted via http://www.ruby-forum.com/.