Closed penntaylor closed 8 years ago
Thanks, this is cool. What do you think making this method private, and having #sort_by
handle both symbols and blocks, branching to this when needed?
5def93a sets up #sort_by to branch as suggested.
Any word on whether this can be merged?
+1
Thank you everyone.
This could be trivially reimplemented as an addition directly to
#sort
by usingKernel#block_given?
. Since I didn't know whether that would be desirable, I implemented it as a completely separate method. Spec contains example use.