Forum: Ruby-core [Assigned] 1.9.3-p392 REXML::Text.unnomralize bug

Posted by usa (Usaku NAKAMURA) (Guest)
on 2013-02-26 01:49
(Received via mailing list)
Issue #7961 has been updated by usa (Usaku NAKAMURA).

Category set to lib
Status changed from Open to Assigned
Assignee set to kou (Kouhei Sutou)
Target version set to 2.1.0
ruby -v set to 1.9.3 p392

trunk, 2.0.0 and 1.9.3 all have same problem.
----------------------------------------
Bug #7961:  1.9.3-p392 REXML::Text.unnomralize bug
https://bugs.ruby-lang.org/issues/7961#change-37017

Author: Anonymous
Status: Assigned
Priority: Normal
Assignee: kou (Kouhei Sutou)
Category: lib
Target version: 2.1.0
ruby -v: 1.9.3 p392


 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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.