I wonder if it's possible to sub-class the Symbol class in order to override the <=> operator method to create a sub-set of Symbols that have a custom order/priority:
class VersionModifier < Symbol
ORDER = [:pre, :alpha, :beta, :rc]
def <=>(other)
ORDER.fetch(to_sym) <=> ORDER.fetch(other.to_sym)
end
end
Still not sure how you'd handle initializing or mapping plain Symbols to your sub-classed Symbols.