TypeErrorbut we don’t have to care about types in Ruby ( or not :)). This is also a
runtime errormeaning that your program just crashed at runtime (definitely not good).
Int32#+and showed us the possible overloads. This is a
compile time errormeaning that our code didn’t compile and we catch the error before running the program. Lovely!
y. We restricted them to be
Numberand Crystal is smart enough to stop us from using the method with a
addmethod and make it work with a String.