All your base (ruby) test wont run

class BaseConverter 
  def self.convert(input_base, digits, output_base)
    
    result = 0
    digit_count = digits.length
    digits.each_with_index do |digit, index|
      result += digit * input_base ** (digit_count - index - 1)
      
    end 
    
    return [0] if result == 0
      
    result_array = []
    while result > 0 
      result_array.unshift(result % output_base)
      result /= output_base
    end 
    result_array
     
  end 
end 

Test failure:

Your tests timed out. This might mean that there was an issue in our infrastructure, but more likely it suggests that your code is running slowly. Is there an infinite loop or something similar?

Please check your code, and if nothing seems to be wrong, try running the tests again.

Is it because of the while loop?

The test will run and is running, as indicated in the response message, it has just timed out. It was taking too long to complete, and so was stopped.

You will want to analyze your code and ensure that you have not introduced an infinite loop, at the worse case, or that your algorithm (simply “instructions to accomplish the work required”) is not unduly inefficient.

As stated in the message that the platform gives you: Please check your code, and if nothing seems to be wrong, try running the tests again.

You’ll need to read the tests to make sure your code is covering all the scenarios that are tested. What if an input digit is not in the range of the input base? What if the output base is 1?