portupgrade code question
oscartheduck at gmail.com
Sat Jan 2 03:12:01 UTC 2010
I've been reading the code for portupgrade and have come across something I don't understand at all.
In the lib/portsdb.rb, the glob method starts on line 757.
On line 773, as part of the glob method, we have the following:
if portinfo = port(pattern)
Won't the condition "if portinfo = port(pattern)" always evaluate to true, as it's an assignation not a test? Is it meant to read if portinfo == port(pattern)?
If so, there are then a fair few tests which use = instead of ==
If not, what's the purpose?
More information about the freebsd-ruby