How do I use heredocs
- From: hsun <sunh11373@xxxxxxxxxxx>
- Date: Fri, 12 Aug 2005 05:24:01 +0900
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
.
- Follow-Ups:
- Re: How do I use heredocs
- From: Jason Foreman
- Re: How do I use heredocs
- From: Mark J . Reed
- Re: How do I use heredocs
- From: David A. Black
- Re: How do I use heredocs
- Prev by Date: Re: What am I doing wrong?
- Next by Date: Re: Head First Design Patterns - Strategy Pattern [was: Java/C# "interface" in Ruby ?]
- Previous by thread: Setting up Eclipse for Ruby
- Next by thread: Re: How do I use heredocs
- Index(es):
Relevant Pages
|
Loading