1 Comment
Have you ever come across an object that was implementing both to_i and to_int? Did you find that it was a little bit redundant (say yes please)? What is the difference between the 2?
If you come from another language, you might be tempted to use the += operator when appending to a string.
Sometimes, you want to initialize a variable to some value only if that variable is equal to nil. If you like to write your methods as short, clean and readable as possible, you can do that task in a single line instead of taking the traditionnal 3 lines approach.