Skip to content

Instantly share code, notes, and snippets.

@dmitry
Created March 7, 2014 12:49
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 dmitry/9410878 to your computer and use it in GitHub Desktop.
Save dmitry/9410878 to your computer and use it in GitHub Desktop.
YAML::ENGINE.yamler = 'psych'
File.open('new/en.yml', 'w') { |f| f.write(Psych.load(File.open('config/locales/en.yml').read).to_yaml) }; 1
check_with = Psych.load(File.open('new/en.yml').read)["en"].to_a; 1
Psych.load(File.open('config/locales/en.yml').read)["en"].to_a.each_with_index do |hash, i|
if check_with[i] != hash
puts hash
puts '---'
puts check_with[i]
puts '---'
break
end
end; 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment