Please Forward A Ruby Quiz Submission

From: Joe <qbproger@gmail.com>
Date: December 2, 2007 5:33:25 PM CST
To: submission@rubyquiz.com
Subject: Please Forward A Ruby Quiz Submission

Submission for Postfix to Infix.

stack = Array.new
ARGV.first.split.each do |n|
        if n.match(/[\d\.]+/) then
                stack.push n
        else
                a,b = stack.pop,stack.pop
                stack.push "(#{b} #{n} #{a})"
        end
end

puts stack.first

Joe

···

Begin forwarded message: