aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml/attribute.rb
diff options
context:
space:
mode:
authorser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-23 15:44:30 +0000
committerser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-23 15:44:30 +0000
commitd15f41b0eb0f284cb15ee814c691e556ae20d8b1 (patch)
treeb2ee8d4e0c6f78c96cfa26c1d2a754e12fc82151 /lib/rexml/attribute.rb
parent7792d9026a592ffc9714bec34d9b911b226036e7 (diff)
downloadruby-d15f41b0eb0f284cb15ee814c691e556ae20d8b1.tar.gz
* Non-String attributes are now converted to Strings; this means code such as
elem.attributes["a"] = 1 will not cause an error when dumping the XML. It also means that: elem.attributes["a"] # => "1", not 1 * Transitive indenting has been cleaned up. * Fixed a potential bug in parsing non-ASCII encoded streams * Fixed a bug where trying to fill in ParseException data was causing an IO error (stream closed) * Changes to Text mean that Element (and Text) can be used outside of a Document context. * In some rare cases, the base parser wasn't reading enough bytes from the stream for the parsing algorithm to work properly. This has been fixed (this was Ruby bug #48426) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/attribute.rb')
-rw-r--r--lib/rexml/attribute.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/attribute.rb b/lib/rexml/attribute.rb
index df07ce7a18..90d7e66122 100644
--- a/lib/rexml/attribute.rb
+++ b/lib/rexml/attribute.rb
@@ -36,7 +36,7 @@ module REXML
elsif first.kind_of? String
@element = parent if parent.kind_of? Element
self.name = first
- @value = second
+ @value = second.to_s
else
raise "illegal argument #{first.class.name} to Attribute constructor"
end