lib/prop_check/generator.rb in prop_check-0.12.0 vs lib/prop_check/generator.rb in prop_check-0.12.1
- old
+ new
@@ -26,10 +26,12 @@
kwargs = @@default_kwargs.merge(kwargs)
max_consecutive_attempts = kwargs[:max_consecutive_attempts]
(0..max_consecutive_attempts).each do
res = @block.call(**kwargs)
- return res unless res.root == :"_PropCheck.filter_me"
+ next if res.root == :"_PropCheck.filter_me"
+
+ return res
end
raise Errors::GeneratorExhaustedError, """
Exhausted #{max_consecutive_attempts} consecutive generation attempts.