3 ms·
I'm Ruby and I ran the sample code: I ran `puts "@aq`b`,Ctg".split("").map(&:succ)*''` Which outputs `Abraca-Duh` and I can't for the life of me figure out wh
by idk1 4y ago
I'm Ruby and I ran the sample code:
I ran `puts "@aq`b`,Ctg".split("").map(&:succ)*''`
Which outputs `Abraca-Duh` and I can't for the life of me figure out why.
Does that fact that I'm Ruby and I've come here to ask that really highlights how much I'm channeling Amy Wong doesn't it?
I've got it now. .succ returns the successor to str. But why on earth would one ever run "@".succ to get 'A'? Seems like a useless function, but I expect I'll just it one day. Good to know.