[macruby-changes] [547] MacRuby/trunk/lib/rubygems/specification.rb
source_changes at macosforge.org
source_changes at macosforge.org
Wed Sep 3 01:16:55 PDT 2008
Revision: 547
http://trac.macosforge.org/projects/ruby/changeset/547
Author: lsansonetti at 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:
--------------
MacRuby/trunk/lib/rubygems/specification.rb
Modified: MacRuby/trunk/lib/rubygems/specification.rb
===================================================================
--- 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) ----------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080903/e0d22582/attachment.html
More information about the macruby-changes
mailing list