Paul Danese
6/15/2007 8:51:00 PM
-----Original Message-----
From: Colin Summers [mailto:bladenut@gmail.com]
Sent: Friday, June 15, 2007 4:36 PM
To: ruby-talk ML
Subject: test to see if a variable exists
So I am stealing all these identities and storing everything in a big
array of objects stolen_identity, and having the index be social
security numbers:
ss[34323843] = Stolen_identity.new
But say I pick up a paycheck stub and it has 3428294. How do I know if
I already have it? Does
if (exist ss[3428294]) then ... end
work? How can I see if a variable exists?
Thanks.
(please include your social security with your answer)
ss[34323843].nil?
my ss# is 1123581321