Project

General

Profile

Actions

Bug #15403

closed

Some methods of Date available in Ruby 2.5 are not available since r66329

Added by y-yagi (Yuji Yaginuma) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-12-12 trunk 66357) [x86_64-linux]
[ruby-core:90443]

Description

In r66329, some methods were moved to DateTime from Date.
This makes it not available to use methods that were available in Ruby 2.5, like hour.

It may not have been intentional that these methods could be used in Date. But Rails uses those methods in Date class.

https://github.com/rails/rails/blob/c4f37cc8c5a3b1de5746146a0f65b22d418cfef4/activesupport/lib/active_support/core_ext/date/calculations.rb#L11
https://github.com/rails/rails/blob/c4f37cc8c5a3b1de5746146a0f65b22d418cfef4/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb#L378
(CI result: https://travis-ci.org/rails/rails/jobs/466863428#L6781-L6845 )

This affect to an old version of Rails too.
This seems incompatible changes. Is it not possible to make it deprecate rather than remove?

Actions

Also available in: Atom PDF

Like0
Like0Like0