Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* lib/psych.rb: specify in rdoc what object is returned in parser

  By Adam Stankiewicz [Github Fixes #133]
  • Loading branch information...
commit edf05c9f40e0c566e391f7e04b4a30327c31a828 1 parent 03659ce
Zachary Scott zzak authored
Showing with 9 additions and 4 deletions.
  1. +5 −0 CHANGELOG.rdoc
  2. +4 −4 lib/psych.rb
5 CHANGELOG.rdoc
View
@@ -1,3 +1,8 @@
+Fri Mar 1 09:15:00 2013 Zachary Scott <zachary@zacharyscott.net>
+
+ * lib/psych.rb: specify in rdoc what object is returned in parser
+ By Adam Stankiewicz [Github Fixes #133]
+
Fri Mar 1 03:22:00 2013 Zachary Scott <zachary@zacharyscott.net>
* lib/psych.rb: rdoc for Psych overview by Adam Stankiewicz
8 lib/psych.rb
View
@@ -252,7 +252,7 @@ def self.load yaml, filename = nil
end
###
- # Parse a YAML string in +yaml+. Returns the first object of a YAML AST.
+ # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document.
# +filename+ is used in the exception message if a Psych::SyntaxError is
# raised.
#
@@ -260,7 +260,7 @@ def self.load yaml, filename = nil
#
# Example:
#
- # Psych.parse("---\n - a\n - b") # => #<Psych::Nodes::Sequence:0x00>
+ # Psych.parse("---\n - a\n - b") # => #<Psych::Nodes::Document:0x00>
#
# begin
# Psych.parse("--- `", "file.txt")
@@ -278,7 +278,7 @@ def self.parse yaml, filename = nil
end
###
- # Parse a file at +filename+. Returns the YAML AST.
+ # Parse a file at +filename+. Returns the Psych::Nodes::Document.
#
# Raises a Psych::SyntaxError when a YAML syntax error is detected.
def self.parse_file filename
@@ -294,7 +294,7 @@ def self.parser
end
###
- # Parse a YAML string in +yaml+. Returns the full AST for the YAML document.
+ # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream.
# This method can handle multiple YAML documents contained in +yaml+.
# +filename+ is used in the exception message if a Psych::SyntaxError is
# raised.
Please sign in to comment.
Something went wrong with that request. Please try again.