Bugs: Browse | Submit New | Admin

[#58] JIDs don't compare equal in hash keys

Date:
2003-08-16 23:30
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
JIDs don't compare equal in hash keys

Detailed description
This program fails to find the equivalent JID in the 
hash keys:

----------------------------
require 'jabber4r/jabber4r'

sJid = "uname@host/res"
hash = {}

jid1 = Jabber::JID.new(sJid)
jid2 = Jabber::JID.new(sJid)

hash[jid1] = "Hello World"

puts "jid1 #{hash[jid1]}"
puts "jid2 #{hash[jid2]}"

----------------------------

Should print:
jid1 Hello World
jid2 Hello World

Does print 
jid1 Hello World
jid2

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
summaryJIDs don't compare equal in hash hash keys2005-06-21 19:43tom