I believe that you have compilation error in this part of your code.
That is not a valid syntax.


if (Person.new == x)


May I know what are you trying to check with that statement?