Backport #7961
closed1.9.3-p392 REXML::Text.unnomralize bug
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
Updated by usa (Usaku NAKAMURA) almost 12 years ago
- 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.
Updated by kou (Kouhei Sutou) almost 12 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r39509.
, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/rexml/document.rb: move entity_expansion_limit accessor to ...
- lib/rexml/rexml.rb: ... here to make rexml/text independent from
REXML::Document. It causes circular require. - lib/rexml/document.rb (REXML::Document.entity_expansion_limit):
deprecated. - lib/rexml/document.rb (REXML::Document.entity_expansion_limit=):
deprecated. - lib/rexml/text.rb: add missing require "rexml/rexml" for
REXML.entity_expansion_limit.
Reported by Robert Ulejczyk. Thanks!!! [ruby-core:52895] [Bug #7961]
Updated by kou (Kouhei Sutou) almost 12 years ago
Here are related commits: r39509, r39510, r39511 and r39528.
Updated by usa (Usaku NAKAMURA) almost 12 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Category deleted (
lib) - Status changed from Closed to Assigned
- Assignee changed from kou (Kouhei Sutou) to nagachika (Tomoyuki Chikanaga)
- Target version deleted (
2.1.0)
I'm planning to backport only r39509 to ruby_1_9_3.
How about ruby_2_0_0, chikanaga-san?
Updated by nagachika (Tomoyuki Chikanaga) almost 12 years ago
I want to merge r39509 and r39511 to ruby_2_0_0.
Updated by nagachika (Tomoyuki Chikanaga) almost 12 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r39952.
, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 39509,39511: [Backport #7961]
* lib/rexml/document.rb: move entity_expansion_limit accessor to ...
* lib/rexml/rexml.rb: ... here to make rexml/text independent from
REXML::Document. It causes circular require.
* lib/rexml/document.rb (REXML::Document.entity_expansion_limit):
deprecated.
* lib/rexml/document.rb (REXML::Document.entity_expansion_limit=):
deprecated.
* lib/rexml/text.rb: add missing require "rexml/rexml" for
REXML.entity_expansion_limit.
Reported by Robert Ulejczyk. Thanks!!! [ruby-core:52895] [Bug #7961]
* lib/rexml/document.rb: move entity_expansion_text_limit accessor to ...
* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit=):
REXML.entity_expansion_text_limit.
Updated by nagachika (Tomoyuki Chikanaga) almost 12 years ago
- Project changed from Backport200 to Backport193
- Status changed from Closed to Assigned
- Assignee changed from nagachika (Tomoyuki Chikanaga) to usa (Usaku NAKAMURA)
Updated by usa (Usaku NAKAMURA) over 11 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r39977.
, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 39509,39511: [Backport #7961]
* lib/rexml/document.rb: move entity_expansion_limit accessor to ...
* lib/rexml/rexml.rb: ... here to make rexml/text independent from
REXML::Document. It causes circular require.
* lib/rexml/document.rb (REXML::Document.entity_expansion_limit):
deprecated.
* lib/rexml/document.rb (REXML::Document.entity_expansion_limit=):
deprecated.
* lib/rexml/text.rb: add missing require "rexml/rexml" for
REXML.entity_expansion_limit.
Reported by Robert Ulejczyk. Thanks!!! [ruby-core:52895] [Bug #7961]
* lib/rexml/document.rb: move entity_expansion_text_limit accessor to ...
* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit=):
REXML.entity_expansion_text_limit.