summaryrefslogtreecommitdiff
path: root/lib/rexml/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/parsers')
-rw-r--r--lib/rexml/parsers/xpathparser.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rexml/parsers/xpathparser.rb b/lib/rexml/parsers/xpathparser.rb
index 780e312671..e643d11511 100644
--- a/lib/rexml/parsers/xpathparser.rb
+++ b/lib/rexml/parsers/xpathparser.rb
@@ -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