Clarify the documentation of the YAML module [Misc #14567]

Based on a patch from Victor Shepelev

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2018-03-02 12:56:37 +00:00
parent 1de78c5fd8
commit 6a792d0b73
1 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,4 @@
# frozen_string_literal: false
##
# The YAML module is an alias of Psych, the YAML engine for Ruby.
begin
require 'psych'
@ -17,7 +15,7 @@ YAML = Psych # :nodoc:
#
# This module provides a Ruby interface for data serialization in YAML format.
#
# The underlying implementation is the libyaml wrapper Psych.
# The YAML module is an alias of Psych, the YAML engine for Ruby.
#
# == Usage
#
@ -31,6 +29,9 @@ YAML = Psych # :nodoc:
# YAML.dump("foo") # => "--- foo\n...\n"
# { :a => 'b'}.to_yaml # => "---\n:a: b\n"
#
# As the implementation is provided by the Psych library, detailed documentation
# can be found in that library's docs (also part of standard library).
#
# == Security
#
# Do not use YAML to load untrusted data. Doing so is unsafe and could allow