1.9 compat

This commit is contained in:
Laurent Sansonetti
2012-06-12 22:07:58 +02:00
parent 5e50f684f5
commit 41138e0542

View File

@@ -24,6 +24,7 @@ task :apply_exceptions do
h_orig = h + '.orig'
next if File.exist?(h_orig)
txt = File.read(h)
txt.force_encoding(Encoding::ASCII_8BIT) if txt.respond_to?(:force_encoding)
# workaround for new objc enum parsing bug
changed = true if txt.gsub!(/NS_(ENUM|OPTIONS)\(([^\s,]+)\s*,\s*([^)]+)\)/, '\2 \3; enum')
case File.basename(h)