Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This is a beautifully elegant solution, but it fails for "I can't see you". It can't shuffle that sentence. The only valid answer should be "I cna't see you" but this solution treats apostrophes as word-breaking. Luckily the kata doesn't test for apostrophes, but the "All punctuation should remain in place" rule is unclear about how apostrophes should be handled. This puzzle is much harder if testing for this extra layer.
It's described in the docs at http://ruby-doc.org/core-2.2.3/String.html#method-i-gsub.
I didn't know you could use
gsub
with a Hash as second argument like that. Learned something new :)