From: Charles Oliver Nutter Date: 2010-01-01T09:40:59+09:00 Subject: Re: Why can't I use "or" here? 2009/12/30 Jörg W Mittag : > 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). We do not all use the same parser. At the very least, they're all written in our local language. We use parsers that were originally ports of the original parser, and while changing over the years still match MRI's parser behavior. If MRI and YARV do it, then we do it because that's what MRI and YARV do. Minor nitpick :) - Charlie