From: "Wolfgang Nádasi-Donner" Date: 2007-01-29T06:10:11+09:00 Subject: Re: Ruby << is ambiguos Neville Franks schrieb: > Hi, I working on syntax highlighting for ED4W and have problem with << > because it has three uses. > > 1. << operator > 2. << HERE Doc > 3. class << Name - Singleton Class > > The problem is determining if << starts a Here Doc. It is easy to handle > class< the following: > > Ared = "mary" > angy = "bill" > angy < print < > Thanks. > > --- > Neville Franks, http://www.getsoft.com http://www.surfulater.com > Ooops! - I Think Ruby itself has some problems with it: irb(main):001:0> Ared = "mary" => "mary" irb(main):002:0> angy = "bill" => "bill" irb(main):003:0> angy < "mary" irb(main):005:0> angy => "billmary" irb(main):006:0> angy << Ared => "billmarymary" irb(main):007:0> angy < angy => "billmarymary" irb(main):011:0> angy << EOT NameError: uninitialized constant EOT from (irb):11 Wolfgang Nádasi-Donner