Ruby - Enumerable - reduce

  • + 5 comments

    The

    uninitialized constant Fixnum (NameError)

    error is being caused by a hidden line of code which checks that we return a Fixnum or Bignum only. Unfortunately, these classes have not existed since Ruby 2.4+.

    I hope the challenge will be updated soon. In the meantime... the error can be fixed by adding the following code at the beginning of your submission:

    Fixnum = Integer
    Bignum = Integer
    

    Cheers!