Project

General

Profile

Actions

Bug #18237

closed

Remove unnecessary checks for `Time` in `Range#each` as per the comment

Added by jwmittag (Jörg W Mittag) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-10-03T09:41:29Z master bf4f3ef5ad) [x86_64-darwin19]
[ruby-core:105531]

Description

In 7817a438eb1803e7b3358f43bd1f38479badfbdc, the implementation of Time#succ, which had been deprecated for 10 years, was finally removed.

During that time, there was an explicit instance_of? check in source:range.c#L350 with a comment that the check should be removed once Time#succ is removed.

Since Time#succ is now gone, I propose removing this check.

Note: this should be coordinated with adding a version guard to the corresponding check in ruby/spec as well.

See the following pull requests for details:

Patches are also attached.


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0