Skip to content

Instantly share code, notes, and snippets.

@demophoon
Created July 1, 2015 02:05
Show Gist options
  • Save demophoon/0ab71e91d05fa3da225f to your computer and use it in GitHub Desktop.
Save demophoon/0ab71e91d05fa3da225f to your computer and use it in GitHub Desktop.
sample_hash = {:key => 'value'}
File.open('/tmp/foo', 'w') { |f| f.write(sample_hash).to_yaml }
# $ cat /tmp/foo
# ---
# !ruby/sym key: value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment