From: Gavin Kistner Date: 2006-10-21T07:28:42+09:00 Subject: Re: multi dim array? From: Robert Klemme [mailto:shortcutter@googlemail.com] > irb(main):002:0> r={"a"=>"B","e"=>"X"} > => {"a"=>"B", "e"=>"X"} > irb(main):003:0> "message".gsub(/./){|k| r[k]||k } > => "mXssBgX" Ooh, that's elegant, using gsub's block like that. I think I'm going to steal it. (I don't have any need for it, but...you know...I gotta HAVE it.)