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

ruby-changes:25318

From: marcandre <ko1@a...>
Date: Mon, 29 Oct 2012 06:19:49 +0900 (JST)
Subject: [ruby-changes:25318] marcandRe: r37370 (trunk): * lib/ostruct.rb: Remove rdoc details on marshal_{load|dump} and fix rdoc

marcandre	2012-10-29 06:18:11 +0900 (Mon, 29 Oct 2012)

  New Revision: 37370

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

  Log:
    * lib/ostruct.rb: Remove rdoc details on marshal_{load|dump} and fix rdoc
    [ruby-core:42557] [ruby-core:42780]

  Modified files:
    trunk/lib/ostruct.rb

Index: lib/ostruct.rb
===================================================================
--- lib/ostruct.rb	(revision 37369)
+++ lib/ostruct.rb	(revision 37370)
@@ -114,40 +114,22 @@
   end
 
   #
-  # Provides marshalling support for use by the Marshal library. Returning the
-  # underlying Hash table that contains the functions defined as the keys and
-  # the values assigned to them.
+  # Provides marshalling support for use by the Marshal library.
   #
-  #    require 'ostruct'
-  #
-  #    person = OpenStruct.new
-  #    person.name = 'John Smith'
-  #    person.age  = 70
-  #
-  #    person.marshal_dump # => { :name => 'John Smith', :age => 70 }
-  #
   def marshal_dump
     @table
   end
 
   #
-  # Provides marshalling support for use by the Marshal library. Accepting
-  # a Hash of keys and values which will be used to populate the internal table
+  # Provides marshalling support for use by the Marshal library.
   #
-  #    require 'ostruct'
-  #
-  #    event = OpenStruct.new
-  #    hash = { 'time' => Time.now, 'title' => 'Birthday Party' }
-  #    event.marshal_load(hash)
-  #    event.title # => 'Birthday Party'
-  #
   def marshal_load(x)
     @table = x
     @table.each_key{|key| new_ostruct_member(key)}
   end
 
   #
-  # #modifiable is used internally to check if the OpenStruct is able to be
+  # Used internally to check if the OpenStruct is able to be
   # modified before granting access to the internal Hash table to be modified.
   #
   def modifiable
@@ -240,7 +222,7 @@
 
   #
   # Compares this object and +other+ for equality.  An OpenStruct is equal to
-  # +other+ when +other+ is an OpenStruct and the two object's Hash tables are
+  # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are
   # equal.
   #
   def ==(other)

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

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