A good way to approach these things is to assume that common functions exist and go from there. Ruby must have had some manner of max/min functions, so I just pulled up a Ruby language reference and searched for "max".
Educated guesses and dumb luck can turn up surprisingly efficient results, sometimes
