From: Gijs Nijholt Date: 2006-10-21T06:51:37+09:00 Subject: multi dim array? Hi (again), I have a multi-dimensional array.. walking through an incoming string like this: def translate(msg) some_alphabet = [ ["a","A"], ["b","B"], ["c","C"], ["d","D"] ] msg.split(//).inject("") { |result, char| result += some_alphabet[2][1] } end This replaces everything in msg with a "C", as it's the third one in the array. But I'm looking for a way to replace not by integer/index but by char, like: some_alphabet["c"][1] I hope you know what I mean.. I looked at at() and find() and scan() but neither seems to fit this task? Thanks! Gijs -- Posted via http://www.ruby-forum.com/.