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.
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!