I've added a Ruby version at the bottom.  Feel free to make it more
elegant or compact.

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