-
-
Save changa/c8549f0c07f9a7df6774 to your computer and use it in GitHub Desktop.
Strange ActiveSupportDuration behaviour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle exec rails console | |
2.1.2 (main):0 > now = Time.now; now - 1.minute == now - Integer(1.minute) | |
=> true | |
2.1.2 (main):0 > now = Time.now; now - 1.month == now - Integer(1.month) | |
=> false # WTF! | |
2.1.2 (main):0 > 1.month == Integer(1.month) | |
=> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment