summaryrefslogtreecommitdiff
path: root/numeric.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-07-04 10:19:10 +0900
committerNobuyoshi Nakada <[email protected]>2024-07-04 12:11:12 +0900
commit0fe024d04845d2f8cac84f5009920b39212e964e ()
treeadb1cb6af0f89bcc10e22242e8afa0b753c19172 /numeric.rb
parent70be2f4731ee708937b10a86461f8dc02fede106 (diff)
Fix the return value of `Integer#downto` called with a block
As the document states, it should return `self`, not `nil`. Fix up of f4b313f7338f5fbe37f73aae29f70aeb474f7f5b.
-rw-r--r--numeric.rb3
1 files changed, 2 insertions, 1 deletions
@@ -243,7 +243,7 @@ class Integer
# call-seq:
# downto(limit) {|i| ... } -> self
- # 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
end
# call-seq: