From: David Stanford Date: 2009-02-04T05:28:49+09:00 Subject: Re: File.delete one-liner > Use exceptions? > > begin > File.delete(lf) > rescue Errno::ENOENT > File.delete(@lf) > end Thanks Joel. Forgive me, I'm just learning Ruby/scripting/programming. I believe I understand your example, but (as far as I can tell) it doesn't really accomplish my goal, and seems to have the same functionality of my first (longer) example. Please let me know if I've missed something. :) In any case, I think I found a (seemingly) obvious solution to my question: @lockfile = some_other_lockfile def self.unlock(lockfile) File.exist?(lockfile) ? File.delete(lockfile) : File.delete(@lockfile) end Thanks again! -David -- Posted via http://www.ruby-forum.com/.