That's because (in Ruby and many other languages) you can use an integer to get to the n-th charactetr in a String just as you can get the n-th element of an Array.
You can think of a String as an ordered list of charscters (technically code points, but thats another story).
It appears that now that we have Ruby 2.5.0 available in Codewars that some of the tests are causing a warning as they are using Fixnum which has been deprecated... This is causing answers to fail that should be valid (they still work in 2.3.0)
That's because (in Ruby and many other languages) you can use an integer to get to the n-th charactetr in a String just as you can get the n-th element of an Array.
You can think of a String as an ordered list of charscters (technically code points, but thats another story).
why don't we need to turn em into arrays ?
What do you think happens if a String argument is given? What is supposed to happen?
It's weird that the zero has a format "0=0" but the regular format has spaces "0+1 = 0"... Consistency would be better.
It appears that now that we have Ruby 2.5.0 available in Codewars that some of the tests are causing a warning as they are using Fixnum which has been deprecated... This is causing answers to fail that should be valid (they still work in 2.3.0)