Should be `@hash = [self.class, @type, @children].hash`. I prefer to use Ruby's composition instead of homegrown XOR.