-
code reports Rake task · Apr 7, 2009
-
sortable arrays of symbols in Ruby · Apr 7, 2009
I got this error in my Rails app because I was trying to sort an array of symbols: undefined method `<=>’ for :my_symbol:Symbol. I defined the spaceship method for the Symbol class and included the Comparable module in order to have other comparison methods available for symbols.