N
Newbie
This must be a common newbie question, but I can't find the answer.
Why does string#[] return an ASCII code, rather than a character?
"abc"[1,2] #-> "bc"
"abc"[1..2] #-> "bc"
"abc"[1] #-> 98
Why does string#[] return an ASCII code, rather than a character?
"abc"[1,2] #-> "bc"
"abc"[1..2] #-> "bc"
"abc"[1] #-> 98