Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 2003 23:54:27 -0500 (EST)
From:      Louis Mamakos <louie@TransSys.COM>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        knu@FreeBSD.org
Subject:   ports/60245: new ruby16-shim-ruby18 bug in included rexml
Message-ID:  <200312150454.hBF4sRx2027325@whizzo.transsys.com>
Resent-Message-ID: <200312150500.hBF50Y2B004843@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         60245
>Category:       ports
>Synopsis:       new ruby16-shim-ruby18 bug in included rexml
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 14 21:00:34 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Louis Mamakos
>Release:        FreeBSD 4.9-RC i386
>Organization:
unorganized
>Environment:
System: FreeBSD whizzo.transsys.com 4.9-RC FreeBSD 4.9-RC #11: Sun Oct 19 16:51:47 EDT 2003 louie@whizzo.transsys.com:/a/obj/usr/src/sys/WHIZZO i386


FreeBSD 4.9
and some ports:
	ruby-1.6.8.2003.10.15
	ruby-shim-ruby18-1.8.1.p2
	ruby-jabber4r-0.4.0

>Description:

The new version of ruby-shim-ruby18-1.8.1.p2 seems to have a bug
in the included rexml Ruby package.  This bug is manifested, at least,
when trying to use the ruby-jabber4r port.  The connection to the
jabber server never opens properly.



>How-To-Repeat:

try to run the example code provided in the ruby-jabber4r port.

>Fix:

There is a patch in the CVS version of jabber4r on Ruby Forge to 
address the problem in the rexml library (reproduced below).  It does
not appear to be specific to the jabber4r Ruby package and is probably
generally applicable.

A seperate issue is perhaps upgrading the jabber4r port, but that's
another topic.  Anyway, the "patch" can be applied at run time
by 'require' the file below which patches a method in the REXML
parser:

module REXML
  module Parsers
    class BaseParser
    # Returns true if there are more events.  Synonymous with !empty?
      def has_next?
        return true if @closed # THIS WAS ADDED TO FIX PROBLEM
        @source.read if @source.buffer.size==0 and !@source.empty?
       (!@source.empty? and @source.buffer.strip.size>0) or @stack.size>0 or @closed
      end
    end
  end
end




>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312150454.hBF4sRx2027325>