e.g., (1..10), but also ("apple".."kiwis") or ('A'..'Z').
In this case, String#succ returns a string with the last alphanumeric character transformed into its successor, e.g., "apple".succ == "applef".
The only time I've used it is implementing the range interface; I've never called it directly, let alone to increment an integer.
e.g., (1..10), but also ("apple".."kiwis") or ('A'..'Z').
In this case, String#succ returns a string with the last alphanumeric character transformed into its successor, e.g., "apple".succ == "applef".
The only time I've used it is implementing the range interface; I've never called it directly, let alone to increment an integer.