Actions
Bug #7674
closedDocument for using Struct.new with block
Description
I wrote the document for using Struct.new with block.
Files
Actions
Like0
Like0Like0Like0Like0Like0Like0
Added by iwadon (Hiroyuki Iwatsuki) about 12 years ago. Updated about 12 years ago.
Description
I wrote the document for using Struct.new with block.
Files
struct.c.diff (1.36 KB) struct.c.diff | iwadon (Hiroyuki Iwatsuki), 01/08/2013 06:31 PM | ||
struct.c.diff (1.44 KB) struct.c.diff | iwadon (Hiroyuki Iwatsuki), 01/09/2013 05:03 AM |
Nitpick.
Struct.new( [aString] [, aSym]+> ) {|| block } -> StructClass
Actually StructClass is passed to the block.
=begin
Thank you for the comment! I understood.
$ ruby -e "p Struct.new(:x){|c| p(c, self)}"
#Class:0x007f8f738b9d90
#Class:0x007f8f738b9d90
#Class:0x007f8f738b9d90
I updated the patch.
=end
missing documentation considered bug
This issue was solved with changeset r38883.
Hiroyuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.