Ruby - Enumerable - reduce

  • + 0 comments

    I'm not sure but it seems like there is an error wit Fixnum and Bignum classes, so one of the monkey patch could be:

    class Integer
        def is_a?(klass)
            return true if klass == Fixnum || klass == Bignum
            super
        end
    end
    

    class Fixnum < Integer end

    class Bignum < Integer end