lib/dry/schema/macros/core.rb in dry-schema-1.13.1 vs lib/dry/schema/macros/core.rb in dry-schema-1.13.2
- old
+ new
@@ -17,13 +17,13 @@
# @api private
option :compiler, default: proc { Compiler.new }
# @api private
- option :trace, default: proc { Trace.new }
+ option :schema_dsl, optional: true
# @api private
- option :schema_dsl, optional: true
+ option :trace, default: proc { Trace.new(schema_dsl&.compiler || Compiler.new) }
# @api private
def new(**options)
self.class.new(name: name, compiler: compiler, schema_dsl: schema_dsl, **options)
end