Allow matching mapper input directly on type

This commit is contained in:
Chris Roberts 2021-10-22 16:10:26 -07:00 committed by Paul Hinze
parent d1974d9a00
commit 5c6587f688
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -48,7 +48,7 @@ module VagrantPlugins
# @param arg [Object] Argument to validate
# @return [Boolean]
def valid?(arg)
if !arg.is_a?(type)
if !arg.is_a?(type) && arg != type
return false
end
validator.call(arg)