lib/google/cloud/firestore/field_path.rb in google-cloud-firestore-2.4.1 vs lib/google/cloud/firestore/field_path.rb in google-cloud-firestore-2.5.0

- old
+ new

@@ -208,17 +208,17 @@ end protected START_FIELD_PATH_CHARS = /\A[a-zA-Z_]/.freeze - INVALID_FIELD_PATH_CHARS = %r{[\~\*\/\[\]]}.freeze + INVALID_FIELD_PATH_CHARS = %r{[~*/\[\]]}.freeze def escape_field_for_path field field = String field if INVALID_FIELD_PATH_CHARS.match(field) || field["."] || field["`"] || field["\\"] - escaped_field = field.gsub(/[\`\\]/, "`" => "\\\`", "\\" => "\\\\") + escaped_field = field.gsub(/[`\\]/, "`" => "\\\`", "\\" => "\\\\") return "`#{escaped_field}`" end return field if START_FIELD_PATH_CHARS.match field