Project

General

Profile

Actions

Bug #1883

closed

REXML hash sometimes computes a value that is too large

Added by panesofglass (Ryan Riley) over 14 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
1.8.6p287
[ruby-core:24754]

Description

=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


Files

rexml-hash.patch (576 Bytes) rexml-hash.patch REXML hash patch panesofglass (Ryan Riley), 08/05/2009 03:24 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0