--e89a8f22c5bdf185c104d69368c5
Content-Type: text/plain; charset=ISO-8859-1
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('&amp;')
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
--e89a8f22c5bdf185c104d69368c5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir="ltr"><div><div><div><div><div><div>Hello everyone,<br></div>there is a bug introduced with p392 in parsing special characters with REXML.<br></div>Here is the sample code to reproduce the bug:<br><br><br>REXML::Text.unnormalize(&#39;&amp;amp;&#39;)<br>
<br><br></div>it produces following error:<br><br><br>NameError: uninitialized constant REXML::Text::Document<br> from /home/ubuntu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/rexml/text.rb:386:in `block innnormalize&#39;<br>
from /home/ubuntu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/rexml/text.rb:384:in `gsub&#39;<br> from /home/ubuntu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/rexml/text.rb:384:in `unnormalize&#39;<br> from (irb):6<br>
<br><br></div>the workaround is to require &quot;rexml/document&quot; manually, but since its being referenced from REXML::Text it should be required there.<br><br><br></div>Thank you and best regards,<br></div>Robert<br>
</div>
--e89a8f22c5bdf185c104d69368c5--