Skip to content

Commit 6abde41

Browse files
committed
Do not return from lambda
So that MRI won't fail
1 parent a6d690c commit 6abde41

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/dry/initializer/plugins/type_constraint.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ def call
1111
ivar = :"@#{rename}"
1212
lambda do |*|
1313
value = instance_variable_get(ivar)
14-
return if value == Dry::Initializer::UNDEFINED
15-
instance_variable_set ivar, type.call(value)
14+
15+
if value != Dry::Initializer::UNDEFINED
16+
instance_variable_set ivar, type.call(value)
17+
end
1618
end
1719
end
1820
end

0 commit comments

Comments
 (0)