Permalink
Browse files

merge miss of r39093.

I don't understand why svn merge didn't merge any files and reported no errors.
terrible...


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@39113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent e5938a1 commit e52527a4f92e5e575ebcc7d9fe83247cae6e0ffe @unak unak committed Feb 6, 2013
Showing with 27 additions and 2 deletions.
  1. +1 −1 lib/rexml/parsers/baseparser.rb
  2. +25 −0 test/rexml/test_comment.rb
  3. +1 −1 version.h
@@ -342,7 +342,7 @@ def pull_event
md = @source.match( COMMENT_PATTERN, true )
case md[1]
- when /--/, /-$/
+ when /--/, /-\z/
raise REXML::ParseException.new("Malformed comment", @source)
end
@@ -0,0 +1,25 @@
+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
View
@@ -1,5 +1,5 @@
#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

0 comments on commit e52527a

Please sign in to comment.