Looks like it may be a regression in regexp or something. The attached
script illustrates how a regexp in
lib/ruby/1.8/rexml/parser/baseparser.rb, the TAG_MATCH regexp, is
building incorrectly in JRuby, resulting in a bad match. Run in both
JRuby and Ruby to compare.

The "Ruby version" and "JRuby version" were retrieved by dumping the
TAG_MATCH regexp at line 334 in baseparser.rb. The "hidden" backtrace
is:
C:\Jrubywork\jruby\lib\ruby\1.8\rexml\parsers\baseparser.rb:369:in `pull'
C:\Jrubywork\jruby\lib\ruby\1.8\rexml\parsers\treeparser.rb:21:in `parse'
C:\Jrubywork\jruby\lib\ruby\1.8\rexml\document.rb:176:in `build'
C:\Jrubywork\jruby\lib\ruby\1.8\rexml\document.rb:45:in `initialize'
C:\Home\xmlTestBug.rb:13:in `new'
C:\Home\xmlTestBug.rb:13:in `testXml'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testcase.rb:70:in `send'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testcase.rb:70:in `run'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:32:in `run'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:32:in `each'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:33:in `run'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:32:in `run'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\testrunnermediator.rb:46:in `each'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:33:in `run'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\testrunnermediator.rb:46:in
`run_suite'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\console\testrunner.rb:65:in
`start_mediator'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\console\testrunner.rb:39:in `start'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\testrunnerutilities.rb:27:in `run'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\autorunner.rb:194:in `run'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\autorunner.rb:14:in `run'
C:\Jrubywork\jruby\lib\ruby\1.8\test\unit.rb:285

I'm no regexp master, but I'll keep poking around.

- Charlie

On 1/22/06, Charles O Nutter <[EMAIL PROTECTED]> wrote:
> Confirmed, it does appear to work fine in 0.8.2 and does not
> now...I'll have a looksee!
>
> - Charlie
>
> On 1/22/06, David Corbin <[EMAIL PROTECTED]> wrote:
> > Here's a wierd regression bug, causing REXML to give false errors.  As near 
> > as
> > I can tell, it worked fine in 0.8.2.
> >
> > Please note, that if the XML parsing is done without the Unit-test, it works
> > fine.  In fact, if you parse it once before the unit test, and once during,
> > it works fine.
> >
> > This doesn't seem like my synchronization bug, as it's too consistent, but 
> > it
> > is blocking me from pursuing that one.
> >
> > David
> >
> >
> >
>

Attachment: test.rb
Description: application/ruby

Reply via email to