# File lib/xpath/expression.rb, line 128 def to_xpath(predicate=nil) string = @expression string = @expression.to_xpath(predicate) unless @expression.is_a?(String) if string.include?("'") string = string.split("'", -1).map do |substr| "'#{substr}'" end.join(%q{,"'",}) "concat(#{string})" else "'#{string}'" end end