Yukihiro Matsumoto schrieb:
> |irb(main):007:0> angy <<EOT
> |irb(main):008:0" xxxxx
> |irb(main):009:0" EOT
> |NameError: uninitialized constant EOT
> |         from (irb):7
> 
> Ruby knows angy is a local variable, so that the interpreter consider
> it is more likely a shift operator than a here-doc.  If you want to
> disambiguate, use parentheses.

I made an error there. "angy" followed by a String doesn't make any sense. It 
works very well if written in in a senseful way.

irb(main):001:0> angy = "abc"
=> "abc"
irb(main):002:0> angy <<<<EOT
irb(main):003:0" ddd
irb(main):004:0" EOT
=> "abcddd\n"

But... - there is one thing I really don't understand in the first example. Ruby 
recognizes "EOT" as an uninitialized constant, because "<<" ist interpreted as 
shift operator. But why is an open here-doc string recognized in line 008:0" in 
the example?

Wolfgang NŠŇasi-Donner