Ad
  • Custom User Avatar

    It should be false as the 7 in the middle is not on the right nor on the left (It should be ignored)

  • Custom User Avatar

    break if (str.empty? || str.to_i == 0)

    This seems wrong aswell... :/ I dont know how to handle exeptions

  • Custom User Avatar

    I got the main right but with error hadling the below code is wrong... What am I missing..?

    raise ArgumentError, 'String is empty' if str.empty?
    raise ArgumentError, 'String is not numeric' if str.to_i == 0