This works, but there's a built in method for doing powers in Ruby, so this was kind of a trick question ;)
base**exp