summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-03 05:44:31 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-03 05:44:31 +0000
commit6bc138b0525d08a62f5d597bc75af66b2176843d (patch)
treedf9929935730ce103728496d2828fff28b479a69 /lib
parent04f41f019a5fda5cc63ef2aadb8acd079a5ee6ec (diff)
* lib/rexml/xmldecl.rb (REXML::XMLDecl#content): Add missing \A
and \z. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rexml/xmldecl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/xmldecl.rb b/lib/rexml/xmldecl.rb
index eac4b17971..465e6abeb7 100644
--- a/lib/rexml/xmldecl.rb
+++ b/lib/rexml/xmldecl.rb
@@ -107,7 +107,7 @@ module REXML
private
def content(enc)
rv = "version='#@version'"
- rv << " encoding='#{enc}'" if @writeencoding || enc !~ /utf-8/i
+ rv << " encoding='#{enc}'" if @writeencoding || enc !~ /\Autf-8\z/i
rv << " standalone='#@standalone'" if @standalone
rv
end