summaryrefslogtreecommitdiff
path: root/test/rss/test_xml-stylesheet.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-06 00:53:34 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-06 00:53:34 +0000
commit00adf578dfd8e505b59a081d4940d807c490cf6c (patch)
tree6b308e4200f3961354da9bb3dd032c4a893cb87f /test/rss/test_xml-stylesheet.rb
parentb3ac1c3fb8e994e34a9c5bfb79d04a61026a8a4d (diff)
Fix wrong regexp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/test_xml-stylesheet.rb')
-rw-r--r--test/rss/test_xml-stylesheet.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/rss/test_xml-stylesheet.rb b/test/rss/test_xml-stylesheet.rb
index cc19a38287e..6edafaeaa05 100644
--- a/test/rss/test_xml-stylesheet.rb
+++ b/test/rss/test_xml-stylesheet.rb
@@ -94,9 +94,9 @@ module RSS
end
def parse_pi(pi)
- /\A\s*<\?(\S+)([^(?:\?>)]+)\?>\s*\z/ =~ pi
+ /\A\s*<\?(\S+)([^?]*\?+(?:[^?>][^?]*\?+)*)>\s*\z/ =~ pi
target = $1
- dummy = REXML::Document.new("<dummy #{$2}/>").root
+ dummy = REXML::Document.new("<dummy #{$2.to_s.chop}/>").root
contents = {}
dummy.attributes.each do |name, value|
contents[name] = value