diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 059d2924b57f..ef37586cf5bd 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -672,8 +672,7 @@ def same_attributes?(other) def hash # :nodoc: @@attributes.inject(0) { |hash_code, (name, default_value)| - n = self.send(name).hash - hash_code + n + hash_code ^ self.send(name).hash } end