I have tiny problem about comparison. I have a array and hash. I want to
compare array elements with hash keys.
more details:
this is my hash, I create it from yaml file
my yaml file
template1:
template_of_roster3: template_of_roster2
template_of_roster4: template_of_roster3
and my array
@my_array=[“template_of_roster”,“template_of_roster2”,“template_of_roster3”]
my question here is that how can I compare array with hash keys and how
can I can send warning message to user? @my_array.eql?(@my_hash.key)==false
warn “warning message”
On Tue, Mar 4, 2008 at 10:29 PM, Ibrahim D. [email protected] wrote:
can I can send warning message to user? @my_array.eql?(@my_hash.key)==false
warn “warning message”
something like this.
thanks…
You have a strange structure here. You have values that act as keys.
4 → 3 and 3 → 2. But, if it won’t be circular, and your hashes are
truly nested, then, here’s a cowboy recursive hack…