[前][次][番号順一覧][スレッド一覧]

ruby-changes:27491

From: zzak <ko1@a...>
Date: Fri, 1 Mar 2013 09:19:00 +0900 (JST)
Subject: [ruby-changes:27491] zzak:r39543 (trunk): * lib/psych.rb: specify in rdoc what object is returned in parser

zzak	2013-03-01 09:18:50 +0900 (Fri, 01 Mar 2013)

  New Revision: 39543

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39543

  Log:
    * lib/psych.rb: specify in rdoc what object is returned in parser
      By Adam Stankiewicz [Github tenderlove/psych#133]

  Modified files:
    trunk/ChangeLog
    trunk/ext/psych/lib/psych.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39542)
+++ ChangeLog	(revision 39543)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Mar  1 09:18:00 2013  Zachary Scott <zachary@z...>
+
+	* 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@s...>
 
 	* lib/rubygems/ext/builder.rb:  Fix incompatibilities when installing
Index: ext/psych/lib/psych.rb
===================================================================
--- ext/psych/lib/psych.rb	(revision 39542)
+++ ext/psych/lib/psych.rb	(revision 39543)
@@ -252,7 +252,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych.rb#L252
   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 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych.rb#L260
   #
   # 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 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych.rb#L278
   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 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych.rb#L294
   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.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]