From: Seebs Date: 2009-12-31T14:55:07+09:00 Subject: Re: Why can't I use "or" here? On 2009-12-31, Albert Schlef wrote: > So it seems Ruby internally recognizes some structures as "statemenets" > and others as "expressions". It seems disapointing at first, but since > Ruby supports precedence for operators (something Lisp doesn't), there > has to be some price to pay. I don't think that's it at all. I think it's that methodname( is a method call (), not a grouping (). Thus the difference between puts(a or b) and puts (a or b) In short, it's nothing to do with statements-vs-expressions, and everything to do with disambiguating method calls vs. parenthesized expressions. -s -- Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!