Commit 4de0a2af authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

Numeric#{upto,downto}: limit may not be an integer

parent f0f113ef
......@@ -10,7 +10,6 @@ class Integer
#
# ISO 15.2.8.3.15
def downto(num, &block)
raise TypeError, "expected Integer" unless num.kind_of? Integer
i = self
while(i >= num)
block.call(i)
......@@ -38,7 +37,6 @@ class Integer
#
# ISO 15.2.8.3.27
def upto(num, &block)
raise TypeError, "expected Integer" unless num.kind_of? Integer
i = self
while(i <= num)
block.call(i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment