Ruby - Bug #13652: Ruby 2.3.4 does not catch Argument error when comparing DateTime with String

Hanmac (Hans Mackowiak)
2017-06-13T06:54:47Z

@derekzwy (Wenyuan Zhang) it is fixed in Ruby2.4.1 and active_support 5.1.1

it looks like the bug does happen in your active_support version.
Try to update to a newer one.