From 7134bbc57cdd0a5a0dec3fb2d670bf44402be28d Mon Sep 17 00:00:00 2001 From: eregon Date: Fri, 2 Mar 2018 12:56:37 +0000 Subject: 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 --- lib/yaml.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/yaml.rb') diff --git a/lib/yaml.rb b/lib/yaml.rb index aa0a1eb470..e47e0a7f9b 100644 --- a/lib/yaml.rb +++ b/lib/yaml.rb @@ -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 -- cgit v1.2.3