From: Alex Young Date: 2006-08-26T05:21:15+09:00 Subject: Re: and and or priority Elliot Temple wrote: > > On Aug 25, 2006, at 12:38 PM, Alex Young wrote: > >> Pavel Smerk wrote: >>> OMG! >>> Why the and and or operators have the same priority? Unlike && and || >>> and also unlike the most of, or maybe all, other languages and >>> conventions? >> Good question. >> >> irb(main):001:0> true and false or true and false >> => false >> >> tells me that and binds tighter than or, unless something unobvious is >> going on, which might well be... >> >> Have you got a counterexample handy? > > irb(main):008:0> true or true and false > => false > Good counter-example :-) Now I understand. It seems to be evaluated in terms of the first encountered. Unless... that's wrong too? :-) -- Alex