From: Dan Zwell Date: 2007-08-24T23:53:48+09:00 Subject: Re: something I just found out, am sharing (:newbish) Pe�a wrote: > From: Dan Zwell [mailto:dzwell@gmail.com] > # &&= is good for making sure a group of things are all true: > # result = true > # expressions.each {|expr| result &&= expr} > > just in case you've forgotten, Dan, > > expressions.all? > > > kind regards -botp > > Pe�a, Good point--my example wasn't very good idiomatic Ruby. However, there are still good occasions to use &&= when your expressions are not in a convenient list. Example: I have a backup script written in Ruby that runs several system commands. I just don't want to put all the commands in a list. So I use &&= to keep track of the state of success of the whole script. Dan