Permalink
Browse files
* lib/psych.rb: specify in rdoc what object is returned in parser
By Adam Stankiewicz [Github ruby/psych#133]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- Loading branch information...
Showing
with
9 additions
and
4 deletions.
-
+5
−0
ChangeLog
-
+4
−4
ext/psych/lib/psych.rb
|
|
@@ -1,3 +1,8 @@ |
|
|
+Fri Mar 1 09:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
|
|
+
|
|
|
+ * lib/psych.rb: specify in rdoc what object is returned in parser
|
|
|
+ By Adam Stankiewicz [Github tenderlove/psych#133]
|
|
|
+
|
|
|
Fri Mar 1 07:21:41 2013 Eric Hodel <drbrain@segment7.net>
|
|
|
|
|
|
* lib/rubygems/ext/builder.rb: Fix incompatibilities when installing
|
|
|
|
@@ -252,15 +252,15 @@ 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.
|
|
|
#
|
|
|
# Raises a Psych::SyntaxError when a YAML syntax error is detected.
|
|
|
#
|
|
|
# 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.
|
|
|
0 comments on commit
6213b83