Hello,

I'm having little hard time understanding following code

<pre>
conf = {
        :hash_key =>
                {
                        'hash_string' => {
                                :hash1 => 'get_me',
                                :hash2 => 'get_me',
                        }
                }
}

puts conf[:hash_key].first #returns Array ?
puts conf[:hash_key].first[0] #returns string "hash_string"
puts conf[:hash_key].first[1] #returns hash that i want
</pre>
http://pastebin.com/6qfE1HDm

Question is, why Ruby returns Array on conf[:hash_key].first ?
The ideal method for me to get hash "hash_string" would be
`conf.first.first` but this returns string "hash_string".

This might be newbie question but I'm learning Ruby on my own :)

Cheers

-- 
Posted via http://www.ruby-forum.com/.