From: Dossy Date: 2002-08-13T01:15:11+09:00 Subject: Re: Ruby Language Q's On 2002.08.13, ts wrote: > >>>>> "D" == Dossy writes: > > D> There IS no method #1? defined. > > in `1?true:false' `1' is interpreted as a Fixnum Ahh. But then, constants aren't method calls, so why doesn't something like this work: irb(main):002:0> FalseClass ? 0 : 1 0 No surprise, right? Then why does this happen: irb(main):003:0> FalseClass?0:1 SyntaxError: compile error (irb):3: parse error FalseClass?0:1 ^ from (irb):3 The compiler should know that FalseClass is a constant and therefore isn't a method call, so the "?" is the operator and should be a seperate token. -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)