Skip to content

Instantly share code, notes, and snippets.

@mutle
Created August 30, 2009 19:49
Show Gist options
  • Save mutle/178101 to your computer and use it in GitHub Desktop.
Save mutle/178101 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
ARGV.each do |file|
data = File.read(file)
if data
if data =~ /\A\#\!ruby19/
exit
else
puts "1.9ifying #{file}"
File.open(file, "w") do |f|
f.write("#!ruby19\n# encoding: utf-8\n\n")
f.write(data)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment