delegate to :class rather than 'self.class'
Merge pull request #8777 from goshakkk/delegate-class

Delegate to :class rather than 'self.class'