Skip to content

Commit

Permalink
use Object#equal? to compare Undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoCaso committed May 28, 2018
1 parent 896bb2c commit 2f61298
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/dry/types/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def try(input)
end

def valid?(value = Undefined)
return true if value == Undefined
super
value.equal?(Undefined) || super
end

# @param [Object] input
Expand Down

0 comments on commit 2f61298

Please sign in to comment.