# Newbea question again?

**URL:** <https://www.ruby-forum.com/t/newbea-question-again/131002>\
**Category:** Rails\
**Created:** [March 5, 2008, 3:30am UTC](https://www.ruby-forum.com/t/newbea-question-again/131002 "2008-03-05T03:30:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@casid](https://www.ruby-forum.com/u/casid)\
**Post date:** [March 5, 2008, 3:30am UTC](https://www.ruby-forum.com/t/newbea-question-again/131002/1 "2008-03-05T03:30:13Z")

</div>

Hello RoR Developers,

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

@get\_config=YAML.load(File.open("#{PATH\_IM}/config/converter.yml"))  
@get\_config == Hash  
@my\_hash==Hash  
@enterprises=@get\_config[“template1”]

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”

something like this.

thanks…
