From: Brian Candler Date: 2010-02-05T16:14:11+09:00 Subject: Re: when should one use "and" and "or" botp wrote: > i believe there are other similar quirks when using "and/or".. > has ruby relegated the use of "and/or"....? No, but it's essentially inherited from perl. These operators have extremely low precedence, so without parens your statement was being parsed as something like (when x==1) or x==2 I think the typical perl use is something like: open F, "foo" or die "Oops"; If you use || then you need extra params so you don't get open(F, "foo" || die "Oops"); But if you rely on poetry mode like this it may still trip you up. IMO you're better off with: a = (some-expr) || (raise "Oops") a = (some-expr) || raise("Oops") -- Posted via http://www.ruby-forum.com/.