Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Be specific what parse method returns #133

Closed
wants to merge 1 commit into from

2 participants

@sheerun

No description provided.

@sheerun

Also, maybe parse method should return stream instead? (as documented before). It's easy to get Document from stream it's but not so easy the other way...

@zzak zzak was assigned
@zzak zzak closed this pull request from a commit
@zzak zzak * lib/psych.rb: specify in rdoc what object is returned in parser
  By Adam Stankiewicz [Github Fixes #133]
edf05c9
@zzak zzak closed this in edf05c9
@zzak
Collaborator

@sheerun Thanks!

@zzak zzak referenced this pull request from a commit in ruby/ruby
@zzak zzak * lib/psych.rb: specify in rdoc what object is returned in parser
  By Adam Stankiewicz [Github tenderlove/psych#133]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
6213b83
@tenderlove tenderlove referenced this pull request from a commit in tenderlove/ruby
@zzak zzak * lib/psych.rb: specify in rdoc what object is returned in parser
  By Adam Stankiewicz [Github tenderlove/psych#133]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
f5e74a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2013
  1. @sheerun
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/psych.rb
View
8 lib/psych.rb
@@ -131,7 +131,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.
#
@@ -139,7 +139,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")
@@ -157,7 +157,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
@@ -173,7 +173,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.
Something went wrong with that request. Please try again.