T
Tom Cloyd
I read in <Programming Ruby 2nd ed.> (p. 303) - ""If Ruby comes across a
line anywhere in the source containing just “_ _END_ _”, with no leading
or trailing whitespace, it treats that line as the end of the
program—any subsequent lines will not be treated as program code."
That's not what's happening for me. The following -
_ _END_ _
__END__
_END_
all produce the same result for me - "undefined local variable or method"
That DOES bring the program to an abrupt end, but its rather ungraceful.
Is this the intended result - a crash due to an interpreter error?
Tom
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< (e-mail address removed) >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
<< directpathdesign.com >> (web site design & consultation)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
line anywhere in the source containing just “_ _END_ _”, with no leading
or trailing whitespace, it treats that line as the end of the
program—any subsequent lines will not be treated as program code."
That's not what's happening for me. The following -
_ _END_ _
__END__
_END_
all produce the same result for me - "undefined local variable or method"
That DOES bring the program to an abrupt end, but its rather ungraceful.
Is this the intended result - a crash due to an interpreter error?
Tom
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< (e-mail address removed) >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
<< directpathdesign.com >> (web site design & consultation)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~