[前][次][番号順一覧][スレッド一覧]

ruby-changes:25395

From: kou <ko1@a...>
Date: Sat, 3 Nov 2012 14:44:40 +0900 (JST)
Subject: [ruby-changes:25395] kou:r37452 (trunk): * lib/rexml/xmldecl.rb (REXML::XMLDecl#content): Add missing \A

kou	2012-11-03 14:44:31 +0900 (Sat, 03 Nov 2012)

  New Revision: 37452

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37452

  Log:
    * lib/rexml/xmldecl.rb (REXML::XMLDecl#content): Add missing \A
      and \z.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rexml/xmldecl.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37451)
+++ ChangeLog	(revision 37452)
@@ -1,3 +1,8 @@
+Sat Nov  3 14:43:42 2012  Kouhei Sutou  <kou@c...>
+
+	* lib/rexml/xmldecl.rb (REXML::XMLDecl#content): Add missing \A
+	  and \z.
+
 Sat Nov  3 14:42:55 2012  Kouhei Sutou  <kou@c...>
 
 	* lib/rexml/output.rb (REXML::Output#initialize): Use normalized
Index: lib/rexml/xmldecl.rb
===================================================================
--- lib/rexml/xmldecl.rb	(revision 37451)
+++ lib/rexml/xmldecl.rb	(revision 37452)
@@ -107,7 +107,7 @@
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]