Good catch. The other option is arguably a little cryptic: `!!url.to_s =~ /^#{Regexp.escape(client_url.to_s)}/`.