Learning Ruby: simple calculator