Skip to content

Commit

Permalink
Clarify the documentation of the YAML module [Misc #14567]
Browse files Browse the repository at this point in the history
Based on a patch from Victor Shepelev

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
eregon committed Mar 2, 2018
1 parent 1de78c5 commit 6a792d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/yaml.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# frozen_string_literal: false
##
# The YAML module is an alias of Psych, the YAML engine for Ruby.

begin
require 'psych'
Expand All @@ -17,7 +15,7 @@
#
# 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
#
Expand All @@ -31,6 +29,9 @@
# 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
Expand Down

0 comments on commit 6a792d0

Please sign in to comment.