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

ruby-changes:27061

From: usa <ko1@a...>
Date: Wed, 6 Feb 2013 22:04:10 +0900 (JST)
Subject: [ruby-changes:27061] usa:r39113 (ruby_1_9_3): merge miss of r39093.

usa	2013-02-06 22:03:59 +0900 (Wed, 06 Feb 2013)

  New Revision: 39113

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

  Log:
    merge miss of r39093.
    
    I don't understand why svn merge didn't merge any files and reported no errors.
    terrible...

  Added files:
    branches/ruby_1_9_3/test/rexml/test_comment.rb
  Modified files:
    branches/ruby_1_9_3/lib/rexml/parsers/baseparser.rb
    branches/ruby_1_9_3/version.h

Index: ruby_1_9_3/lib/rexml/parsers/baseparser.rb
===================================================================
--- ruby_1_9_3/lib/rexml/parsers/baseparser.rb	(revision 39112)
+++ ruby_1_9_3/lib/rexml/parsers/baseparser.rb	(revision 39113)
@@ -342,7 +342,7 @@ module REXML https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/rexml/parsers/baseparser.rb#L342
                 md = @source.match( COMMENT_PATTERN, true )
 
                 case md[1]
-                when /--/, /-$/
+                when /--/, /-\z/
                   raise REXML::ParseException.new("Malformed comment", @source)
                 end
 
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 39112)
+++ ruby_1_9_3/version.h	(revision 39113)
@@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 384
+#define RUBY_PATCHLEVEL 385
 
 #define RUBY_RELEASE_DATE "2013-02-06"
 #define RUBY_RELEASE_YEAR 2013
Index: ruby_1_9_3/test/rexml/test_comment.rb
===================================================================
--- ruby_1_9_3/test/rexml/test_comment.rb	(revision 0)
+++ ruby_1_9_3/test/rexml/test_comment.rb	(revision 39113)
@@ -0,0 +1,25 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/rexml/test_comment.rb#L1
+require "test/unit/testcase"
+
+require 'rexml/document'
+
+module REXMLTest
+  class CommentTester < Test::Unit::TestCase
+    # Bug #5278
+    def test_hyphen_end_line_in_doctype
+      xml = <<-XML
+<?xml version="1.0"?>
+<!DOCTYPE root [
+<!-- comment end with hyphen -
+     here -->
+]>
+<root/>
+      XML
+      document = REXML::Document.new(xml)
+      comments = document.doctype.children.find_all do |child|
+        child.is_a?(REXML::Comment)
+      end
+      assert_equal([" comment end with hyphen -\n     here "],
+                   comments.collect(&:to_s))
+    end
+  end
+end

Property changes on: ruby_1_9_3/test/rexml/test_comment.rb
___________________________________________________________________
Added: svn:eol-style
   + LF


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

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