Fix the return value of Integer#downto called with a block

As the document states, it should return `self`, not `nil`.
Fix up of f4b313f733.
This commit is contained in:
Nobuyoshi Nakada 2024-07-04 10:19:10 +09:00
parent 70be2f4731
commit 0fe024d048
2 changed files with 8 additions and 7 deletions

View file

@ -243,7 +243,7 @@ class Integer
# call-seq:
# downto(limit) {|i| ... } -> self
# downto(limit) -> enumerator
# downto(limit) -> enumerator
#
# Calls the given block with each integer value from +self+ down to +limit+;
# returns +self+:
@ -268,6 +268,7 @@ class Integer
yield from
from = from.pred
end
self
end
# call-seq: