require 'set'

The Set class is not loaded automatically so if it is to be used, it must be required.