Ticket #158 (new defect)

Opened 2 months ago

Last modified 2 months ago

[patch] REXML::Formatters::Pretty#wrap fails on long words and on long lines

Reported by: alk Owned by: ser
Priority: normal Milestone:
Component: Other Version: 3.1.7
Severity: normal Keywords:
Cc: alk Ruby version: 1.8.6
Operating system: Linux

Description

I encountered bug in REXML by running rcov which uses pretty formatter for it's html reports.

It turns out that #wrap fails with too long words. In this case rindex returns nil, which is not accounted for.

Another issue is recursion. I've run into stack overflow. The fix is (hopefuly) equivalent transformation of recursive computational process into interative.

Attachments

rexml-pretty-formatter-wrap-fix.patch (1.0 kB) - added by alk 2 months ago.

Change History

Changed 2 months ago by alk

Changed 2 months ago by alk

  • version changed from 3.1.6 to 3.1.7

Changed 2 months ago by alk

  • cc alk added
Note: See TracTickets for help on using tickets.