From: CompGeek78 Date: 2008-08-01T03:19:13+09:00 Subject: Re: Question on do block On Jul 31, 12:14 pm, Gregory Brown wrote: > On Thu, Jul 31, 2008 at 2:09 PM, CompGeek78 wrote: > > The problem I ran into is in changing the > to a =. > > > def mtdarry > >  10.times do |num| > >    square = num * num > >    return num, square if num = 7 > >  end > > end > > You want an equality check, not assignment. > > >> a = 1 > => 1 > >> a == 1 > => true > >> a == 2 > > => false > > num = 7 is always true, because all values except false and nil are > true in the boolean sense in Ruby. > num == 7 is only true when num is 7. > > -greg Oh gads I'm an idiot...thanks.