J
James Edward Gray II
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...
James Edward Gray II
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...
James Edward Gray II