Bug #18237
closedRemove unnecessary checks for `Time` in `Range#each` as per the comment
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
Updated by jwmittag (Jörg W Mittag) about 3 years ago
- Description updated (diff)
Updated by jwmittag (Jörg W Mittag) about 3 years ago
- File Remove-unnecessary-checks-in-Range-each-Bug-18237.patch Remove-unnecessary-checks-in-Range-each-Bug-18237.patch added
- Description updated (diff)
Updated by jwmittag (Jörg W Mittag) about 3 years ago
- Description updated (diff)
- File Remove-unnecessary-checks-in-Range-each-spec-Bug-18237.patch Remove-unnecessary-checks-in-Range-each-spec-Bug-18237.patch added
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.