mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
1de78c5fd8
commit
6a792d0b73
1 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,4 @@
|
||||||
# frozen_string_literal: false
|
# frozen_string_literal: false
|
||||||
##
|
|
||||||
# The YAML module is an alias of Psych, the YAML engine for Ruby.
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'psych'
|
require 'psych'
|
||||||
|
@ -17,7 +15,7 @@ YAML = Psych # :nodoc:
|
||||||
#
|
#
|
||||||
# This module provides a Ruby interface for data serialization in YAML format.
|
# 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
|
# == Usage
|
||||||
#
|
#
|
||||||
|
@ -31,6 +29,9 @@ YAML = Psych # :nodoc:
|
||||||
# YAML.dump("foo") # => "--- foo\n...\n"
|
# YAML.dump("foo") # => "--- foo\n...\n"
|
||||||
# { :a => 'b'}.to_yaml # => "---\n:a: b\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
|
# == Security
|
||||||
#
|
#
|
||||||
# Do not use YAML to load untrusted data. Doing so is unsafe and could allow
|
# Do not use YAML to load untrusted data. Doing so is unsafe and could allow
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue