lib/rantly/shrinks.rb in rantly-2.0.0 vs lib/rantly/shrinks.rb in rantly-3.0.0
- old
+ new
@@ -1,19 +1,18 @@
# Integer : shrink to zero
class Integer
def shrink
- shrunk = if self > 8
- self / 2
- elsif self > 0
- self - 1
- elsif self < -8
- (self + 1) / 2
- elsif self < 0
- self + 1
- else
- 0
+ if self > 8
+ self / 2
+ elsif self > 0
+ self - 1
+ elsif self < -8
+ (self + 1) / 2
+ elsif self < 0
+ self + 1
+ else
+ 0
end
- shrunk
end
def retry?
false
end