summaryrefslogtreecommitdiff
path: root/lib/rexml/parsers/treeparser.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-01 05:43:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-01 05:43:50 +0000
commit1448668244c81cfc720bcdfa93af352a17cc230f (patch)
tree550af4707b22d099f4d8393e29ef6da424aca813 /lib/rexml/parsers/treeparser.rb
parent96e7713754c477fe98806b905301356371accb68 (diff)
* lib/rexml: 1.9 patch from Sam Ruby mentioned in his blog:
<http://intertwingly.net/blog/2007/12/31/Porting-REXML-to-Ruby-1-9> [ruby-core:14639] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/parsers/treeparser.rb')
-rw-r--r--lib/rexml/parsers/treeparser.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rexml/parsers/treeparser.rb b/lib/rexml/parsers/treeparser.rb
index 5c3e142ea7..30327d0dfd 100644
--- a/lib/rexml/parsers/treeparser.rb
+++ b/lib/rexml/parsers/treeparser.rb
@@ -30,7 +30,10 @@ module REXML
return
when :start_element
tag_stack.push(event[1])
- el = @build_context = @build_context.add_element( event[1], event[2] )
+ el = @build_context = @build_context.add_element( event[1] )
+ event[2].each do |key, value|
+ el.attributes[key]=Attribute.new(key,value,self)
+ end
when :end_element
tag_stack.pop
@build_context = @build_context.parent