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.
And why the downvotes then?
That's not a kata issue, your code doesn't work as it is written in the available Ruby version (and I already told you why). If that's not helping, I don't know what you want. Instead of chaining methods, separate what you do in several steps and print that, you'll see why your code fails here.
I was able to make your code work, but I had to modify it.
In repl.it (Ruby version 2.5 like in CW) it also returns 1. Check how you're sorting and what you return.
Fixed, sorry about that!