T
Todd Burch
text = <<EOD
Hi there. Why does the Here Document
require there to be no space after
the closing symbol? If I type "EOD " and press
enter, I get a syntax error. (See below.) If I type "EOD" with
an immediate carraige return, it works fine.
Why so stringent?
EOD
puts text
=begin
Error: #<SyntaxError: (eval):0:in `load': /Library/Application
Support/Google SketchUp
6/SketchUp/Plugins/myscripts/here_document_test.rb:12: can't find string
"EOD" anywhere before EOF
/Library/Application Support/Google SketchUp
6/SketchUp/Plugins/myscripts/here_document_test.rb:1: parse error,
unexpected $, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR
or tSTRING_END>
(eval)
(eval):0
=end
Hi there. Why does the Here Document
require there to be no space after
the closing symbol? If I type "EOD " and press
enter, I get a syntax error. (See below.) If I type "EOD" with
an immediate carraige return, it works fine.
Why so stringent?
EOD
puts text
=begin
Error: #<SyntaxError: (eval):0:in `load': /Library/Application
Support/Google SketchUp
6/SketchUp/Plugins/myscripts/here_document_test.rb:12: can't find string
"EOD" anywhere before EOF
/Library/Application Support/Google SketchUp
6/SketchUp/Plugins/myscripts/here_document_test.rb:1: parse error,
unexpected $, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR
or tSTRING_END>
(eval)
(eval):0
=end