Revision
547
Author
lsansonetti@apple.com
Date
2008-09-03 01:16:54 -0700 (Wed, 03 Sep 2008)

Log Message

Gem::Specification#hash returns a bignum, which is a problem because NSObject#hash is 'unsigned long'

Modified Paths

Diff

Modified: MacRuby/trunk/lib/rubygems/specification.rb (546 => 547)


--- MacRuby/trunk/lib/rubygems/specification.rb	2008-09-03 08:15:17 UTC (rev 546)
+++ MacRuby/trunk/lib/rubygems/specification.rb	2008-09-03 08:16:54 UTC (rev 547)
@@ -738,7 +738,7 @@
       @@attributes.inject(0) { |hash_code, (name, default_value)|
         n = self.send(name).hash
         hash_code + n
-      }
+      } / @@attributes.length # XXX because NSObject#hash is 'unsigned long' and this returns a bignum
     end
 
     # Export methods (YAML and Ruby code) ----------------------------