当从未更新过对象时,instance.created_at == instance.updated_at为什么返回“ false”?

I have an instance of a model which I'm playing with in my console. The instance is called mz.

irb(main):002:0> mz.updated_at
=> Fri, 24 Apr 2020 14:01:38 UTC +00:00
irb(main):003:0> mz.created_at
=> Fri, 24 Apr 2020 14:01:38 UTC +00:00
irb(main):004:0> mz.created_at == mz.updated_at
=> false

为什么会这样呢?

在我看来,它应该返回true。

(我正在尝试解决非抽象编码问题的此问题,但我以这种方式最好描述它。)

评论