How do I use heredocs



Hi,

I have a simple test program.

====================
class QuickTest
def testMe
str = <<EOS
Some Application data
EOS puts str
end end


if $0 == __FILE__ then

$test = QuickTest.new
$test.testMe
end ===========================


I got this error and could not figure out what's wrong?

==============================================
QuickTest.rb:21: can't find string "EOS" anywhere before EOF
QuickTest.rb:6: syntax error
===============================================

Can someone help?

I am running Ruby 1.8 on Windows XP


Thanks









.



Relevant Pages

  • Re: How do I use heredocs
    ... QuickTest.rb:21: can't find string "EOS" anywhere before EOF ... David A. Black dblack@xxxxxxxxxxxx ...
    (comp.lang.ruby)
  • HCM BLACK PAPER
    ... EOS in it not counting the normal EOS at end of string. ... There is not free lunch in compression ... My Crypto code ...
    (comp.compression)
  • Re: Correction
    ... And negative lookbehind assertion: ... how do I describe a string consisting of any number of characters, ... match, but not 'eos'. ... quantifiers, removing the end-of-string assertion... ...
    (microsoft.public.dotnet.general)
  • Re: string.each
    ... lets say im reading a string from a socket and its super long, ... puts str# idetify the first word, ...
    (comp.lang.ruby)
  • Re: String delete method help
    ... I get is the entire string without any changes and with no errors. ... strings you pass to delete have no characters in common, ...
    (comp.lang.ruby)

Loading