Skip to content

Instantly share code, notes, and snippets.

@gorenje
Created June 21, 2019 08:45
Show Gist options
  • Save gorenje/a053028732ce89eacb0c2581f0f2a6b0 to your computer and use it in GitHub Desktop.
Save gorenje/a053028732ce89eacb0c2581f0f2a6b0 to your computer and use it in GitHub Desktop.
Strange things happening
## Ruby 2.5.3
[5] pry(main)> (Date.today -10).strftime("%Y-%m-%d")
=> "2019-06-21"
[6] pry(main)> (Date.today - 10).strftime("%Y-%m-%d")
=> "2019-06-11"
[7] pry(main)> (Date.today-10).strftime("%Y-%m-%d")
=> "2019-06-11"
[13] pry(main)> (1 -3)
=> -2
[14] pry(main)> (1 - 3)
=> -2
[15] pry(main)> (1-3)
=> -2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment