[macruby-changes] [2523] MacRuby/trunk/lib/rubygems
source_changes at macosforge.org
source_changes at macosforge.org
Tue Sep 8 20:06:04 PDT 2009
Revision: 2523
http://trac.macosforge.org/projects/ruby/changeset/2523
Author: lsansonetti at apple.com
Date: 2009-09-08 20:06:04 -0700 (Tue, 08 Sep 2009)
Log Message:
-----------
workaround NSObject#hash limitation (temporary)
Modified Paths:
--------------
MacRuby/trunk/lib/rubygems/specification.rb
MacRuby/trunk/lib/rubygems/version.rb
Modified: MacRuby/trunk/lib/rubygems/specification.rb
===================================================================
--- MacRuby/trunk/lib/rubygems/specification.rb 2009-09-09 03:04:34 UTC (rev 2522)
+++ MacRuby/trunk/lib/rubygems/specification.rb 2009-09-09 03:06:04 UTC (rev 2523)
@@ -664,7 +664,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
+ } / @@attributes.length # XXX NSObject#hash won't accept Bignum
end
def to_yaml(opts = {}) # :nodoc:
Modified: MacRuby/trunk/lib/rubygems/version.rb
===================================================================
--- MacRuby/trunk/lib/rubygems/version.rb 2009-09-09 03:04:34 UTC (rev 2522)
+++ MacRuby/trunk/lib/rubygems/version.rb 2009-09-09 03:06:04 UTC (rev 2523)
@@ -132,7 +132,8 @@
end
def hash # :nodoc:
- @version.hash
+ #@version.hash
+ @version.hash / 2 # XXX NSObject#hash won't accept Bignum
end
# Return a new version object where the next to the last revision
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090908/0955d6ac/attachment.html>
More information about the macruby-changes
mailing list