From: Eric Hodel Date: 2005-03-17T07:44:24+09:00 Subject: Re: Heredoc and array / hash construction syntax error --Apple-Mail-9--438143558 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 16 Mar 2005, at 14:19, David Tran wrote: > My question is how can you construct a "heredoc array" ( or hash). > > Let me start with is code: > a = [ > 1, > 2 > ] > > it is perfect ruby syntax. > > but if you put the ',' on next line like: > a = [ > 1 > , > 2 > ] > then you got syntax error. > > It seems stupid to put ',' on next line but I have no choice, > here is my use case with heredoc example: Like this: $ ruby a = [ <