From: Charles Nutter Date: 2011-07-22T07:28:36+09:00 Subject: [ruby-core:38366] [Backport86 - Bug #1883] REXML hash sometimes computes a value that is too large Issue #1883 has been updated by Charles Nutter. This does not appear to have been backported to ruby_1_8_7 branch, so we have gotten recent reports about it being a bug in JRuby. Is it possible to get this tiny patch backported to ruby_1_8_7, so we can pull the change into our patched stdlib at https://github.com/jruby/ruby/tree/jruby-ruby_1_8_7 ? I'd rather not apply the patch unilaterally, but this is a visible bug that needs fixing. ---------------------------------------- Bug #1883: REXML hash sometimes computes a value that is too large http://redmine.ruby-lang.org/issues/1883 Author: Ryan Riley Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: 1.8.6p287 =begin The hash method sometimes computes a value that is too large. This is a rare occurrence in MRI, but this is causing problems for IronRuby. The following patch is suggested for computing smaller hashes: edit: c:/ruby/libs/ruby/1.8/rexml/attribute.rb;C908357 File: attribute.rb =================================================================== --- c:/ruby/libs/ruby/1.8/rexml/attribute.rb;C908357 (server) 6/23/2009 1:24 PM +++ c:/ruby/libs/ruby/1.8/rexml/attribute.rb @@ -93,7 +93,7 @@ # Creates (and returns) a hash from both the name and value def hash - name.hash + value.hash + name.hash ^ value.hash end # Returns this attribute out as XML source, expanding the name =================================================================== =end -- http://redmine.ruby-lang.org