From 197eea3404169141abd79d6edcd38291d8aa983b Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sat, 28 Nov 2009 21:40:59 +0000 Subject: * lib/rexml/formatters/default.rb (write_attribute): fix an exception when printing a document when duplicate namespaced attributes exist. Thanks, Alexey Froloff [ruby-core:2389] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rexml/test_document.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb index 0261e80b74..a35fce7dca 100644 --- a/test/rexml/test_document.rb +++ b/test/rexml/test_document.rb @@ -2,6 +2,25 @@ require "rexml/document" require "test/unit" class REXML::TestDocument < Test::Unit::TestCase + def test_version_attributes_to_s + doc = REXML::Document.new(<<-eoxml) + + + + eoxml + + string = doc.to_s + assert_match('xmlns:sodipodi', string) + assert_match('xmlns:inkscape', string) + assert_match('sodipodi:version', string) + assert_match('inkscape:version', string) + end + def test_new doc = REXML::Document.new(< -- cgit v1.2.3