summaryrefslogtreecommitdiff
path: root/lib/rexml/xmldecl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/xmldecl.rb')
-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