Original issue #3865
handle not only strings in date type cast
Why do you return the value regardless if it is a valid date or not? Shouldn't you return nil as you did on line 137?
Original code work that way. Datetime column assignment works such way.
So it seams to be unexpected behaviour.
@tenderlove could you take a look?