Project

General

Profile

Actions

Backport #7961

closed

1.9.3-p392 REXML::Text.unnomralize bug

Added by Anonymous about 11 years ago. Updated about 11 years ago.

Status:
Closed
[ruby-core:52895]

Description

Hello everyone,
there is a bug introduced with p392 in parsing special characters with
REXML.
Here is the sample code to reproduce the bug:

REXML::Text.unnormalize('&')

it produces following error:

NameError: uninitialized constant REXML::Text::Document
from
/home/ubuntu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/rexml/text.rb:386:in
block in unnormalize' from /home/ubuntu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/rexml/text.rb:384:in gsub'
from
/home/ubuntu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/rexml/text.rb:384:in
`unnormalize'
from (irb):6

the workaround is to require "rexml/document" manually, but since its being
referenced from REXML::Text it should be required there.

Thank you and best regards,
Robert

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0