How do i make a key in a hash(in ruby, if you missed the subject) point to a key in another hash?
I want this:
hash1["key"] = "hay guise"
hash2["key"] = hash1["key"]
hash1["key"] = "ruby is for faggots"
p hash2["key"]
to output > "ruby is for faggots"
Name:
Anonymous2008-02-01 8:21
that's not a hash, that is a pointer
Name:
Anonymous2008-02-01 8:21
Your problem is not that you want to make a key in a hash point to a key in another hash, but something else. Tell us what that something else is and we will help you.
Name:
Anonymous2008-02-01 8:24
You can't.
Name:
Anonymous2008-02-01 8:30
>>3
The something else was an array, which i managed to solve now that you realized it for me, thanks.