summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-29 01:36:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-29 01:36:26 +0000
commitb62936e1904a448ba12fdcf54e33ccc1501df885 (patch)
tree8645dc83703a8ffb11bc4930c6caad593405f9b6
parente924a2b8ea4782010598cebd8c1a27d7b92ed941 (diff)
downloadruby-b62936e1904a448ba12fdcf54e33ccc1501df885.tar.gz
ruby-b62936e1904a448ba12fdcf54e33ccc1501df885.tar.xz
ruby-b62936e1904a448ba12fdcf54e33ccc1501df885.zip
* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::STANDALONE):
any number spaces can be placed between equal-sign and the value. patch from Ed Howland in [ruby-core:27345]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/rexml/parsers/baseparser.rb2
-rw-r--r--lib/rexml/rexml.rb2
-rw-r--r--test/rexml/test_document.rb10
-rw-r--r--version.h4
5 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 93c57e790..3a0aced88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Dec 29 10:36:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::STANDALONE):
+ any number spaces can be placed between equal-sign and the value.
+ patch from Ed Howland in [ruby-core:27345].
+
Mon Dec 28 22:33:58 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (CreateChild): force to inherit standard I/O handles.
diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb
index 2f758265b..3c80231c3 100644
--- a/lib/rexml/parsers/baseparser.rb
+++ b/lib/rexml/parsers/baseparser.rb
@@ -66,7 +66,7 @@ module REXML
VERSION = /\bversion\s*=\s*["'](.*?)['"]/um
ENCODING = /\bencoding\s*=\s*["'](.*?)['"]/um
- STANDALONE = /\bstandalone\s*=\s["'](.*?)['"]/um
+ STANDALONE = /\bstandalone\s*=\s*["'](.*?)['"]/um
ENTITY_START = /^\s*<!ENTITY/
IDENTITY = /^([!\*\w\-]+)(\s+#{NCNAME_STR})?(\s+["'](.*?)['"])?(\s+['"](.*?)["'])?/u
diff --git a/lib/rexml/rexml.rb b/lib/rexml/rexml.rb
index ab2f44561..f89951171 100644
--- a/lib/rexml/rexml.rb
+++ b/lib/rexml/rexml.rb
@@ -24,7 +24,7 @@ module REXML
COPYRIGHT = "Copyright © 2001-2008 Sean Russell <ser@germane-software.com>"
DATE = "2008/019"
VERSION = "3.1.7.3"
- REVISION = "$Revision$".gsub(/\$Revision:|\$/,'').strip
+ REVISION = %w$Revision$[1] || ''
Copyright = COPYRIGHT
Version = VERSION
diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb
index a35fce7dc..1ee1a1d41 100644
--- a/test/rexml/test_document.rb
+++ b/test/rexml/test_document.rb
@@ -82,4 +82,14 @@ EOF
ensure
REXML::Document.entity_expansion_limit = 10000
end
+
+ def test_xml_declaration_standalone
+ bug2539 = '[ruby-core:27345]'
+ doc = REXML::Document.new('<?xml version="1.0" standalone="no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ doc = REXML::Document.new('<?xml version="1.0" standalone= "no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ doc = REXML::Document.new('<?xml version="1.0" standalone= "no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ end
end
diff --git a/version.h b/version.h
index b6c5fa820..3ab33a3b7 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2009-12-28"
+#define RUBY_RELEASE_DATE "2009-12-29"
#define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "trunk"
@@ -8,7 +8,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2009
#define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 28
+#define RUBY_RELEASE_DAY 29
#include "ruby/version.h"