diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-03 14:01:20 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-03 14:01:20 +0000 |
commit | 73c57761a91e9a9240aea829453cc545ed033fee (patch) | |
tree | 4ca60f8af78ea59d2009643ba3cabfeca5ba3c7b /lib/rexml/parsers | |
parent | 4c1fa1a6a4365c792635b53c5f34f098710c5a4f (diff) | |
download | ruby-73c57761a91e9a9240aea829453cc545ed033fee.tar.gz |
* lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
Add source information to parse exception on no close tag error.
[Bug #8844] [ruby-dev:47672]
Patch by Ippei Obayashi. Thanks!!!
* test/rexml/parser/test_tree.rb: Add a test for the above case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/parsers')
-rw-r--r-- | lib/rexml/parsers/treeparser.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/parsers/treeparser.rb b/lib/rexml/parsers/treeparser.rb index 4dd1b90590..68edb77759 100644 --- a/lib/rexml/parsers/treeparser.rb +++ b/lib/rexml/parsers/treeparser.rb @@ -24,8 +24,8 @@ module REXML case event[0] when :end_document unless tag_stack.empty? - #raise ParseException.new("No close tag for #{tag_stack.inspect}") - raise ParseException.new("No close tag for #{@build_context.xpath}") + raise ParseException.new("No close tag for #{@build_context.xpath}", + @parser.source, @parser) end return when :start_element |