Commit 143dd14e by Daniel Mendler

sort magic by priority again

parent 735b5ca2
...@@ -88,7 +88,7 @@ magics = [] ...@@ -88,7 +88,7 @@ magics = []
end end
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 "# -*- coding: binary -*-"
puts "# Generated from #{FILE}" puts "# Generated from #{FILE}"
...@@ -113,7 +113,7 @@ puts " }" ...@@ -113,7 +113,7 @@ puts " }"
puts " # @private" puts " # @private"
puts " # :nodoc:" puts " # :nodoc:"
puts " MAGIC = [" puts " MAGIC = ["
magics.sort.each do |type, matches| magics.each do |priority, type, matches|
puts " ['#{type}', #{matches.inspect}]," puts " ['#{type}', #{matches.inspect}],"
end end
puts " ]" 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