A couple of ruby programming challenges