From: "Jörg W Mittag" Date: 2009-12-31T11:45:09+09:00 Subject: Re: Why can't I use "or" here? Albert Schlef wrote: > [...] > puts(nil or 4) > > fails... it is a syntax error, for some mysterious reason. > > Why? I thought the only diference between "or" and "||" is the > precedence. Looks like a genuine bug to me. I can verify that behavior in MRI, YARV, JRuby, IronRuby and Rubinius (which is not terribly surprising since they all use the exact same parser). I'd be interested in XRuby, since that's the only sort-of complete (well, for a very generous definition of "complete", anyway) Ruby implementation I know of which has its own parser. (Tinyrb has its own parser, but it doesn't have full syntax compatibility as a goal anyway. Cardinal also has its own parser, AFAIK, but it's a *loong* way from being syntax-complete.) jwm