From: Richard Kilmer Date: 2004-03-18T13:23:38+09:00 Subject: Re: [ANN] Jabber4r 0.6.0 now works with Ruby 1.8.1 On Mar 17, 2004, at 8:54 PM, Sean Russell wrote: > Richard Kilmer wrote in message > news:... >> There was a bug in REXML for SAX parsing...but I have a patch in the >> jabber4r stuff (protocol.rb) that fixes it. Oh, and under 1.8.0 you >> needed to require 'rexml_1.8_patch'. This is no longer necessary >> under >> 1.8.1. If you use CVS of Ruby you don't need either patch. Anyway, >> let me know if it works or not :-) > > Rich, > > Is this a bug that I've already fixed, or are you just hoarding the > patch for your own nefarious purposes? it just keeps changing on me from one version to another ;-) the issue is i have a socket protocol that delivers xml as a (non \n terminated) continuous string. you have kept changing the way that the base parser handles things...it may be fixed in the current version, but with the one shipped with 1.8.1 it did not work without me changing the behavior of the socket (io) prior to passing it to your parsing method. Specifically I do this: if REXML::Version=="2.7.3" || REXML::Version=="2.7.4" def @stream.read(len=nil) len = 100 unless len super(len) end def @stream.gets(char=nil) super(">") end def @stream.readline(char=nil) super(">") end def @stream.readlines(char=nil) super(">") end end this made things work...but it obviously is a bit weird :-) -rich > > --- SER > >