Fix a wrong type check in self.new

The change introduced by https://github.com/rubygems/rubygems/commit/81d806d818baeb5dcb6398ca631d772a003d078e is wrong.  It compares a String instance to Class.  So that the condition is always evaluated to false.