lib/google/cloud/firestore/field_path.rb in google-cloud-firestore-0.25.0 vs lib/google/cloud/firestore/field_path.rb in google-cloud-firestore-0.25.1

- old
+ new

@@ -108,11 +108,11 @@ # ) # nested_field_path.formatted_string #=> "favorites.food" # def formatted_string escaped_fields = @fields.map { |field| escape_field_for_path field } - escaped_fields.join(".") + escaped_fields.join "." end ## # Creates a field path object representing the sentinel ID of a # document. It can be used in queries to sort or filter by the document @@ -173,19 +173,20 @@ if @memoized_field_paths.key? dotted_string return @memoized_field_paths[dotted_string] end if dotted_string.is_a? Array - return @memoized_field_paths[dotted_string] = new(dotted_string) + @memoized_field_paths[dotted_string] = new dotted_string + return @memoized_field_paths[dotted_string] end - fields = String(dotted_string).split(".") + fields = String(dotted_string).split "." if fields.grep(INVALID_FIELD_PATH_CHARS).any? raise ArgumentError, "invalid character, use FieldPath instead" end - @memoized_field_paths[dotted_string] = new(fields) + @memoized_field_paths[dotted_string] = new fields end ## # @private def <=> other