I am new to ruby on rails and started a tutorial and found out the following function
def string_shuffle(s)
>> s.split('').?.?
>> end
=> nil
>> string_shuffle("foobar")
What does s.split('').?.? do? I know the split method but i have no idea what the two question marks are for. I saw “? used in boolean methods, but i couldnt understand how this one works. I tried to google it but, I couldnt find it at all.
To quote the tutorial in question:
Listing 4.10 is an exercise where the two question marks are meant to be replaced with actual method calls.