From: Lincoln Anderson Date: 2006-09-14T09:28:40+09:00 Subject: Question about 'unless' (negated if) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Using this snippet: dir.each { |str| ftp.get(str) unless str.index('d') == 0 system("mkdir " + lpath + str.split('/').index(str.length-1)) system("cd " + lpath + str.split('/').index(str.length-1)) } Will system be called both times all the time, or will the first one be called only when the unless condition is satisfied, or will both calls only be enacted when the unless condition is satisfied? I've seen examples that used else statements with unless calls, but I'm not sure if this is needed here or not. Unless is new to me :) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFCKITKte2c0P8BH0RAtHAAJkBVZQ5yV8glhpACggeDPcH2RtCxgCeJRPv PCFuN23jhfTfvcv4NP3rDBY= =X7eL -----END PGP SIGNATURE-----