1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Replace regexp with include? ... more readable

This commit is contained in:
Jonas Nicklas 2009-11-30 21:50:40 +01:00
parent 4363452f6d
commit e71d66b791

View file

@ -199,7 +199,7 @@ module Capybara
end
def sanitized_xpath_string(string)
if string =~ /'/
if string.include?("'")
string = string.split("'", -1).map do |substr|
"'#{substr}'"
end.join(%q{,"'",})