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

ruby-changes:22585

From: marcandre <ko1@a...>
Date: Thu, 16 Feb 2012 06:05:11 +0900 (JST)
Subject: [ruby-changes:22585] marcandRe: r34634 (ruby_1_9_3): merge revision(s) 34619:

marcandre	2012-02-16 06:05:01 +0900 (Thu, 16 Feb 2012)

  New Revision: 34634

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

  Log:
    merge revision(s) 34619:
    
        * lib/ostruct.rb: Simplify and fix rdoc.

  Modified files:
    branches/ruby_1_9_3/lib/ostruct.rb

Index: ruby_1_9_3/lib/ostruct.rb
===================================================================
--- ruby_1_9_3/lib/ostruct.rb	(revision 34633)
+++ ruby_1_9_3/lib/ostruct.rb	(revision 34634)
@@ -30,12 +30,6 @@
 # An OpenStruct employs a Hash internally to store the methods and values and
 # can even be initialized with one:
 #
-#   country_data = { :country => "Australia", :population => 20_000_000 }
-#   australia = OpenStruct.new(country_data)
-#   p australia   # -> <OpenStruct country="Australia" population=20000000>
-#
-# You may also define the hash in the initialization call:
-#
 #   australia = OpenStruct.new(:country => "Australia", :population => 20_000_000)
 #   p australia   # -> <OpenStruct country="Australia" population=20000000>
 #
@@ -89,12 +83,6 @@
   #
   #   p data        # -> <OpenStruct country="Australia" population=20000000>
   #
-  # You may also define the hash in the initialization call:
-  #
-  #   australia = OpenStruct.new(:country => "Australia",
-  #                              :population => 20_000_000)
-  #   p australia   # -> <OpenStruct country="Australia" population=20000000>
-  #
   def initialize(hash=nil)
     @table = {}
     if hash
@@ -146,7 +134,7 @@
 
   #
   # #modifiable is used internally to check if the OpenStruct is able to be
-  # modified before granting access to the internal Hash table to be augmented.
+  # modified before granting access to the internal Hash table to be modified.
   #
   def modifiable
     begin
@@ -190,8 +178,8 @@
   end
 
   #
-  # Remove the named field from the object. Returning the value that the field
-  # contained if it has defined.
+  # Remove the named field from the object. Returns the value that the field
+  # contained if it was defined.
   #
   #   require 'ostruct'
   #

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

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