solution

My solution to your contest (http://www.jetbrains.com/ruby/contest/challenge.jsp?utm_source=rubyweekly&utm_medium=email)