[#99868] [Ruby master Bug#17144] Tempfile.open { ... } does not unlink the file — eregontp@...
Issue #17144 has been reported by Eregon (Benoit Daloze).
15 messages
2020/09/03
[ruby-core:100121] [Ruby master Bug#15712] DateTime#=== should be defined and compare date and time instead of just the date
From:
matz@...
Date:
2020-09-25 05:22:00 UTC
List:
ruby-core #100121
Issue #15712 has been updated by matz (Yukihiro Matsumoto). I admit it is a bug. But we consider use of `DateTime` should be discouraged. So we keep this **bug** behavior for compatibility's sake. We are going to describe obsoletion in the document. Matz. ---------------------------------------- Bug #15712: DateTime#=== should be defined and compare date and time instead of just the date https://bugs.ruby-lang.org/issues/15712#change-87689 * Author: localhostdotdev (localhost .dev) * Status: Feedback * Priority: Normal * ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67296) [x86_64-darwin17] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- DateTime#=== is inherited from Date#=== without overwriting the #=== method, this leads to DateTime#=== comparing only dates and ignore the time part. ``` DateTime.new(2001, 2, 3) === DateTime.new(2001, 2, 3, 12) => false ``` I think this is not the expected behavior but existing code might rely on this. Date#===: https://ruby-doc.org/stdlib-2.1.9/libdoc/date/rdoc/Date.html#method-i-3D-3D-3D Source: https://medium.com/@dvandersluis/an-rspec-time-issue-and-its-not-about-timezones-a89bbd167b86 -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>