From: ThoML Date: 2008-07-08T00:51:26+09:00 Subject: Re: Another logical precedence question > I was surprised to find that it was nil when no argument was > provided. If I changed things to: > > $user_type = ARGV.shift or usage > $user_map = (ARGV.shift or DEFAULT_MAP) Consider the following example: irb(main):001:0> a = nil or 1 => 1 irb(main):002:0> a => nil irb(main):003:0> a = nil || 1 => 1 irb(main):004:0> a => 1 So what you're doing is (ut = ARGV.shift) or usage but I'm pretty sure that what you want to do is ut = ARGV.shift || usage