Introduce Fixnum#finite? and Bignum#finite?
I propose to introduce
Bignum#finite? methods. Use case for this is following:
Interval = Struct.new(:from, :to) do def finite? from.finite? && to.finite? end end
For now this works:
Interval.new(1.5, 1000.0).finite? Interval.new(1.5, Float::INFINITY).finite?
But this fails due to absence of
Interval.new(1, 3).finite? Interval.new(1, Float::INFINITY).finite?
It looks natural that
Fixnum#finite? should always return
true. I didn't worked extensively with
Bignum-s, but probably
Bignum#finite? should also always be