"for i in (1..12/5); p i ; end" should not print "3"

This commit is contained in:
Yukihiro Matz Matsumoto
2013-02-09 17:53:12 +09:00
parent d98ad06ef5
commit 84a7c9ed1c
+3 -2
View File
@@ -23,8 +23,9 @@ class Range
val = val.succ
end
block.call(val) unless exclude_end?
if not exclude_end? and (val <=> last) == 0
block.call(val)
end
self
end
end