From: Todd Benson Date: 2009-03-01T00:51:23+09:00 Subject: Re: How to put multiple values into a variable. On Sat, Feb 28, 2009 at 9:37 AM, Harry Nash wrote: > I am new to coding, I have tried to place a number of data strings into > one variable but I am missing something in the format. See example > below. > Note each part of the line after = does have a real value, I just > can't format the string. > > file-link = Dir.pwd, "#{filename}", "#{mp3-title}", "#{mp3-artist}" You did put all the strings into an array called file-link (that is, unless you are getting a specific error that relates to your strings). You could be trying to print or rely upon something that doesn't exist. Do you get NilClass errors? For the unwary, try this to see how multiple assignment works (1.8.6)... a, b = 1, 2 # a => 1, b => 2 a, b = 1, 2, 3 # a => 1, b => 2 ---- 3 is just lost a = 1, 2 # a => [1, 2] a, *b = 1, 2, 3 # a => 1, b => [2, 3] hth, Todd