Sorting an assortment of strings and integers together, while keeping them separate
Your test cases should include lexical sort of integers; that is, [9,11] must return [11,9].  (Your implementation does pass this test since you're converting everything to a string).

As you suspected, mangling the input is hacky.  This is better accomplished with a multi-criteria sort.  This technique maps each individual value to an array of sort criteria.  Ruby will compare the arrays only until it finds unequal elements; this means you can mix integers and strings in the second field, so long as the first field distinguishes them.

For our problem, the first field will be 0 for integers else 1.  The second field is the value itself.

Although this approach will never compare integers to strings—if the first criteria distinguishes the two elements, the comparison is done—the second criteria must be a string anyway, to satisfy the "sort alphabetically" requirement.

It's not necessary to sort the entire array or store a full copy of it.  Instead, count duplicates in a hash table.  Traverse the values of the hash to find a maximum.  Traverse again to extract the corresponding keys.

def highest_occurrence(arr)
    return arr if arr.size &lt;= 1
    count = Hash.new(0)
    arr.each { |k| count[k] += 1 }
    max = count.max_by{|k,n| n}[1]
    return count.select { |k,n| n==max }.keys.sort_by { |k| [ k.is_a?(Integer)?0:1, k.to_s ] }
end