mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rexml/parsers/xpathparser.rb
(REXML::Parsers::XPathParser#parse), test/rexml/test_elements.rb (ElementsTester::test_each_with_frozen_condition): don't modify original XPath. fixes #4164 Reported by Pavel Shved. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8aecece693
commit
80cb3351dd
3 changed files with 20 additions and 1 deletions
|
@ -17,8 +17,9 @@ module REXML
|
|||
end
|
||||
|
||||
def parse path
|
||||
path = path.dup
|
||||
path.gsub!(/([\(\[])\s+/, '\1') # Strip ignorable spaces
|
||||
path.gsub!( /\s+([\]\)])/, '\1' )
|
||||
path.gsub!( /\s+([\]\)])/, '\1')
|
||||
parsed = []
|
||||
path = OrExpr(path, parsed)
|
||||
parsed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue