Project

General

Profile

Actions

Bug #7674

closed

Document for using Struct.new with block

Added by iwadon (Hiroyuki Iwatsuki) over 11 years ago. Updated about 11 years ago.

Status:
Closed
Assignee:
Target version:
ruby -v:
2.0.0
Backport:
[ruby-core:51314]

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
Actions #1

Updated by Glass_saga (Masaki Matsushita) over 11 years ago

  • Tracker changed from Bug to Feature

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

Nitpick.

  • Struct.new( [aString] [, aSym]+> ) {|| block }  -> StructClass
    

Actually StructClass is passed to the block.

Updated by iwadon (Hiroyuki Iwatsuki) over 11 years ago

=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

Updated by zzak (zzak _) over 11 years ago

  • Category set to doc
  • Assignee set to zzak (zzak _)
  • Target version set to 2.0.0

Updated by zzak (zzak _) about 11 years ago

  • Tracker changed from Feature to Bug
  • ruby -v set to 2.0.0

missing documentation considered bug

Actions #6

Updated by zzak (zzak _) about 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

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.


  • struct.c (Struct.new): Document Struct.new with block
    Patch by Hiroyuki Iwatsuki [Bug #7674]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0