diff options
author | Marcus Stollsteimer <sto.mar@web.de> | 2017-12-19 23:23:38 +0100 |
---|---|---|
committer | Marcus Stollsteimer <sto.mar@web.de> | 2018-04-24 22:20:13 +0200 |
commit | 04ad1627b9f5eee57b64019cf2694c34c85edb10 (patch) | |
tree | 656d89d13a338e8df9258d0ac4f7c72f4c493bb3 /lib | |
parent | 91731afbd181f78c9aea07bc1b65ff20a20010b9 (diff) | |
download | psych-04ad1627b9f5eee57b64019cf2694c34c85edb10.zip |
Add docs for fallback keyword argument of Psych.load
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/psych.rb b/lib/psych.rb index 0caaf4c..d314ebf 100644 --- a/lib/psych.rb +++ b/lib/psych.rb @@ -236,8 +236,9 @@ module Psych ### # Load +yaml+ in to a Ruby data structure. If multiple documents are # provided, the object contained in the first document will be returned. - # +filename+ will be used in the exception message if any exception is raised - # while parsing. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. # # Raises a Psych::SyntaxError when a YAML syntax error is detected. # |