Skip to content

Commit c46019e

Browse files
committed
DateOfBirth#to_s should always return a string
1 parent 637e68b commit c46019e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/date_of_birth.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def initialize(date_string)
77
end
88

99
def to_s
10-
return if match.nil?
10+
return '' if match.nil?
1111
'%d-%02d-%02d' % [match[:year], month(match[:month]), match[:day]]
1212
end
1313

0 commit comments

Comments
 (0)