From: Jim Haungs Date: 2010-09-29T05:29:37+09:00 Subject: Re: puts and return Interesting. Thanks. One sees control code like this in rails all the time: redirect_to and return if Never having looked at the return value from redirect_to (but guessing it's always non-nil), I guess I assumed 'and' was the non-short-circuit operator. Otherwise, why this is idiom so prevalent? Because it looks more English-like? Rick Denatale wrote: > No, the only difference between && and 'and' is their parsing > precedence. > > And nearly every time I've seen and used instead of && I've found a bug. > > On Tue, Sep 28, 2010 at 4:03 PM, Jim Haungs wrote: >> Expected output: >> 1 ok >> too big >> 9 ok >> -- >> Posted via http://www.ruby-forum.com/. >> >> > > > > -- > Rick DeNatale > > Blog: http://talklikeaduck.denhaven2.com/ > Github: http://github.com/rubyredrick > Twitter: @RickDeNatale > WWR: http://www.workingwithrails.com/person/9021-rick-denatale > LinkedIn: http://www.linkedin.com/in/rickdenatale -- Posted via http://www.ruby-forum.com/.