Skip to content

Instantly share code, notes, and snippets.

@manveru
Created January 16, 2012 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manveru/1621636 to your computer and use it in GitHub Desktop.
Save manveru/1621636 to your computer and use it in GitHub Desktop.
Convert from syck to proper YAML syntax
#!/usr/bin/env ruby
require 'yaml'
ARGV.each do |path|
YAML::ENGINE.yamler = 'syck'
obj = YAML.load_file(path)
YAML::ENGINE.yamler = 'psych'
File.open(path, 'w+'){|io| io.write(obj.to_yaml) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment