Hi --

On Sun, 3 Oct 2004, James Edward Gray II wrote:

> Ruby's here-doc syntax baffles me.  I don't get the indent the end tag 
> feature.
> 
> string = <<-END_OF_STRING
> 	Line one...
> 	line two...
> 	line three.
> 	END_OF_STRING
> 
> That leaves all the tabs at the beginning of those lines, which then 
> begs the question, why did I bother to indent the end tag?
> 
> It would make a lot more sense to me if lines of a here-doc were 
> stripped of leading whitespace equal to the indention of the end tag.  
> Is there any reason this wasn't done, or isn't practical?
> 
> If not, please consider this an official request, by at least one 
> coder...

This has come up before; I don't remember what the state of discussion
was as of the end of the last iteration, but you'll find stuff in the
ruby-talk (or ruby-core, but I think ruby-talk) archives from the past
year or less.  (I'm being lazy and not looking it up myself, but it's
there :-)


David

-- 
David A. Black
dblack / wobblini.net