We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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=IntegerBignum=Integer
Cheers!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Ruby - Enumerable - reduce
You are viewing a single comment's thread. Return to all comments →
The
error is being caused by a hidden line of code which checks that we return a
Fixnum
orBignum
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:
Cheers!