diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-11-12 11:04:06 -0500 |
---|---|---|
committer | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-11-12 11:07:36 -0500 |
commit | 0210e310d04cbc9b236ccdde6caaf79aab4eb794 (patch) | |
tree | 23b545e39d29ae7740f2f625a3a8ef3d2e375304 /README.md | |
parent | 67ecafb0e2aed5974adff45280080eab1e25656d (diff) | |
download | psych-0210e310d04cbc9b236ccdde6caaf79aab4eb794.tar.gz |
Add `Psych.safe_load_file`. Tweak doc to provide `safe_` examples.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -12,8 +12,8 @@ serialize and de-serialize most Ruby objects to and from the YAML format. ## Examples ```ruby -# Load YAML in to a Ruby object -Psych.load('--- foo') # => 'foo' +# Safely load YAML in to a Ruby object +Psych.safe_load('--- foo') # => 'foo' # Emit YAML from a Ruby object Psych.dump("foo") # => "--- foo\n...\n" |