Update Assignment2.rb

Just added a sorted set of values instead of just if they work display them, that way it automatically sorts and removes copies. Has not been tested yet.