From 00230c1ecf2f415c98a1f0e29f6342e48575e18e Mon Sep 17 00:00:00 2001 From: robuye Date: Mon, 25 Feb 2013 20:50:16 +0000 Subject: [PATCH] [Issue #37] fixes REXML bug introduced in Ruby 1.9.3-p392 --- lib/nori/xml_utility_node.rb | 1 + spec/nori/nori_spec.rb | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/nori/xml_utility_node.rb b/lib/nori/xml_utility_node.rb index 2aa86d1..dbe48f9 100644 --- a/lib/nori/xml_utility_node.rb +++ b/lib/nori/xml_utility_node.rb @@ -1,4 +1,5 @@ require "rexml/text" +require "rexml/document" require "date" require "time" require "yaml" diff --git a/spec/nori/nori_spec.rb b/spec/nori/nori_spec.rb index 8aed030..d4af43c 100644 --- a/spec/nori/nori_spec.rb +++ b/spec/nori/nori_spec.rb @@ -7,6 +7,11 @@ let(:parser) { parser } + it "should work with unnormalized characters" do + xml = '&' + parse(xml).should == { 'root' => "&" } + end + it "should transform a simple tag with content" do xml = "This is the contents" parse(xml).should == { 'tag' => 'This is the contents' }