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) about 3 years ago. Updated about 3 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 #1

Updated by jwmittag (Jörg W Mittag) about 3 years ago

  • Description updated (diff)
Actions #4

Updated by Anonymous about 3 years ago

  • Status changed from Open to Closed

Applied in changeset git|fb03598666ddbb9f8b35eb4f599e75654ca7ca06.


Remove unnecessary checks in Range#each [Bug #18237]

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, this check should be removed.

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0