Hi --

On Fri, 26 Jun 2009, Ryan Davis wrote:

>
> On Jun 25, 2009, at 18:25 , David A. Black wrote:
>
>> There's absolutely nothing wrong with using here-documents. I would,
>> however, normally avoid the double-barreled one (the one that the OP
>> was asking about). It's quite clear what it does, once you know how
>> here-docs work, but I don't like the two here-docs themselves in quick
>> sequence like that, especially if they're longer (which they almost
>> certainly would be). It would be a (minor) nuisance to have to parse
>> the two of them visually to locate the first delimiter. I imagine
>> there's always a somewhat clearer way.
>
> don't say two... it isn't limited to two... it is N!

I figured two would be understood to encompass 3+ also :-)

> method <<-END1.kill, <<-END2.me, <<-ENDN.now!

And don't forget the ever (un)popular:

def method(*); end
a=b=d=e=1
c = []
res = method(a,b,c<<d,<<d,e)  # :-)
Hi!
d


David

-- 
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.rubypal.com
Now available: The Well-Grounded Rubyist (http://manning.com/black2)
"Ruby 1.9: What You Need To Know" Envycasts with David A. Black
http://www.envycasts.com