lib/prop_check/helper.rb in prop_check-0.11.0 vs lib/prop_check/helper.rb in prop_check-0.11.1
- old
+ new
@@ -29,7 +29,21 @@
# >> PropCheck::Helper::LazyAppend.lazy_append([1,2,3],[4,5.6]).to_a
# => [1,2,3,4,5,6]
def lazy_append(this_enumerator, other_enumerator)
[this_enumerator, other_enumerator].lazy.flat_map(&:lazy)
end
+
+ def call_splatted(val, &block)
+ case val
+ when Hash
+ block.call(**val)
+ else
+ block.call(val)
+ end
+ # if kwval != {}
+ # block.call(**kwval)
+ # else
+ # block.call(*val)
+ # end
+ end
end
end