lib/jsi/schema/validation/ref.rb in jsi-0.7.0 vs lib/jsi/schema/validation/ref.rb in jsi-0.8.0

- old
+ new

@@ -8,10 +8,10 @@ def internal_validate_ref(result_builder, throw_result: false) if keyword?('$ref') value = schema_content['$ref'] if value.respond_to?(:to_str) - schema_ref = jsi_memoize(:ref) { Schema::Ref.new(value, self) } + schema_ref = self.schema_ref('$ref') if result_builder.visited_refs.include?(schema_ref) result_builder.schema_error('self-referential schema structure', '$ref') else ref_result = schema_ref.deref_schema.internal_validate_instance(