Implementing a Reverse Polish notation calculator in Ruby