Commit 143dd14e by Daniel Mendler

sort magic by priority again

parent 735b5ca2
......@@ -88,7 +88,7 @@ magics = []
end
end
magics = magics.sort {|a,b| b[0] <=> a[0] }.map {|x| [x[1], x[2]] }
magics = magics.sort {|a,b| [-a[0],a[1]] <=> [-b[0],b[1]] }
puts "# -*- coding: binary -*-"
puts "# Generated from #{FILE}"
......@@ -113,7 +113,7 @@ puts " }"
puts " # @private"
puts " # :nodoc:"
puts " MAGIC = ["
magics.sort.each do |type, matches|
magics.each do |priority, type, matches|
puts " ['#{type}', #{matches.inspect}],"
end
puts " ]"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment