From 95dd735aec3cfc593b7dc2d0250b50d4ee3e8207 Mon Sep 17 00:00:00 2001 From: marcandre Date: Wed, 15 Feb 2012 21:05:01 +0000 Subject: merge revision(s) 34619: * lib/ostruct.rb: Simplify and fix rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/ostruct.rb | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/ostruct.rb b/lib/ostruct.rb index 3779b2dc00..a57eb08e7c 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -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 # -> -# -# You may also define the hash in the initialization call: -# # australia = OpenStruct.new(:country => "Australia", :population => 20_000_000) # p australia # -> # @@ -89,12 +83,6 @@ class OpenStruct # # p data # -> # - # You may also define the hash in the initialization call: - # - # australia = OpenStruct.new(:country => "Australia", - # :population => 20_000_000) - # p australia # -> - # def initialize(hash=nil) @table = {} if hash @@ -146,7 +134,7 @@ class OpenStruct # # #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 @@ class OpenStruct 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' # -- cgit v1.2.3