@@@@@src rb_ary_new
: VALUE rb_ary_new()
     Ruby ֤ޤ

    б Ruby ץ

      ary = []

    

      VALUE ary;
      ary = rb_ary_new();

@@@@@ok rb_ary_new
: VALUE rb_ary_new()
     Ruby ֤ޤ

    б Ruby ץ

      ary = []

    

      VALUE ary;
      ary = rb_ary_new();

@@@@@src rb_ary_store
: void rb_ary_store(VALUE ary, long idx, VALUE val)
     ((|ary|)) Υǥå ((|idx|)) 
    ((|val|)) Ǽޤ((|idx|)) ϰϤۤȤ
    Ruby ٥ƱưŪ˥ĥޤ

    бRuby

      ary[idx] = val

    

      VALUE ary;
      int idx;
      int n[5] = { 1, 2, 3, 4, 5 };
      ary = rb_ary_new();
      for (idx=0; idx<5; idx++) rb_ary_store(ary, idx, INT2FIX(n[idx])); 

@@@@@ok rb_ary_store
: void rb_ary_store(VALUE ary, long idx, VALUE val)
     ary Υǥå idx 
    val Ǽޤidx ϰϤۤȤ
    Ruby ٥ƱưŪ˥ĥޤ

    бRuby

      ary[idx] = val

    

      VALUE ary;
      int idx;
      int n[5] = { 1, 2, 3, 4, 5 };
      ary = rb_ary_new();
      for (idx=0; idx<5; idx++) rb_ary_store(ary, idx, INT2FIX(n[idx])); 

@@@@@src rb_scan_args
: int rb_scan_args(int argc, VALUE *argv, const char *fmt, VALUE *var0, *var1, ...)
    Ĺ ((|argc|))  VALUE  ((|argv|))  ((|fmt|)) 
    äƥ󤷡((|var0|)) ((|var1|)) ġ ˽񤭤ߤޤ
    ((|argc|)) ֤ޤ

    ((|fmt|)) եޥå
      .
        1   2   3   4   ХȤ
       ----------------
       \d  \d  '*' '&'
        |   |   |   |
        |   |   |   +-- ֥å Proc ֥ȤȤƼ
        |   |   +------ Ĥ Ruby ȤƼ
        |   +---------- άǽʰθĿ
        +-------------- άǤʤθĿ

        \d ˤϿꡣ'*' '&' Ϥ줾줽ʸꡣ
        (2) ꤹʤ (1) ϾάԲġ
        (3)(4) ϼͳ˾άǽɬν֤Ǥʤ
        ʤʤ

    

        VALUE a, b, optv;
        rb_scan_args(argc, argv, "21", &a, &b, &optv);

    б Ruby ץǤ

        def some_method( a, b, opt = nil )

     (2)

        VALUE a, rest, block;
        rb_scan_args(argc, argv, "1*&", &a, &rest, &block);

    б Ruby ץǤ

        def some_method( a, *rest, &block )

@@@@@ok rb_scan_args
: int rb_scan_args(int argc, VALUE *argv, const char *fmt, VALUE *var0, *var1, ...)
    Ĺ argc  VALUE  argv  fmt 
    äƥ󤷡var0 var1 ġ ˽񤭤ߤޤ
    argc ֤ޤ

    fmt եޥå
      .
        1   2   3   4   ХȤ
       ----------------
       \d  \d  '*' '&'
        |   |   |   |
        |   |   |   +-- ֥å Proc ֥ȤȤƼ
        |   |   +------ Ĥ Ruby ȤƼ
        |   +---------- άǽʰθĿ
        +-------------- άǤʤθĿ

        \d ˤϿꡣ'*' '&' Ϥ줾줽ʸꡣ
        (2) ꤹʤ (1) ϾάԲġ
        (3)(4) ϼͳ˾άǽɬν֤Ǥʤ
        ʤʤ

    

        VALUE a, b, optv;
        rb_scan_args(argc, argv, "21", &a, &b, &optv);

    б Ruby ץǤ

        def some_method( a, b, opt = nil )

     (2)

        VALUE a, rest, block;
        rb_scan_args(argc, argv, "1*&", &a, &rest, &block);

    б Ruby ץǤ

        def some_method( a, *rest, &block )

@@@@@src rb_raise
: rb_raise(VALUE exception_type, char *fmt, ...)
    㳰ȯޤ((|exception_type|)) 㳰饹
    ʤФޤ((|fmt|)) ȻĤΰ (({sprintf})) 
    Ʊͤ˲ᤵ졢㳰Υåˤʤޤ

@@@@@ok rb_raise
: rb_raise(VALUE exception_type, char *fmt, ...)
    㳰ȯޤexception_type 㳰饹
    ʤФޤfmt ȻĤΰ sprintf 
    Ʊͤ˲ᤵ졢㳰Υåˤʤޤ

@@@@@src rb_gc_register_address
: void rb_gc_register_address(VALUE *addr)
    ݥ ((|addr|)) ؤѿ GC оݤˤޤ

    : [ruby-list:20488]

@@@@@ok rb_gc_register_address
: void rb_gc_register_address(VALUE *addr)
    ݥ addr ؤѿ GC оݤˤޤ

    : [ruby-list:20488]

@@@@@src pipe_open
: static VALUE pipe_open(char *pname, char *mode)
    popen(3)¹Ԥޤ((|pname|))((|mode|))popen(3)
    бޤ

    ((|pname|))ϡ¹Ԥץ(({"-"}))ʤСȤ
    fork(2)ޤ

@@@@@ok pipe_open
: static VALUE pipe_open(char *pname, char *mode)
    popen(3)¹Ԥޤpnamemodepopen(3)
    бޤ

    pnameϡ¹Ԥץ"-"ʤСȤ
    fork(2)ޤ

@@@@@src ALLOC
: type* ALLOC(type)
    (({sizeof(type)})) ХȤΥݤƬؤΥݥ󥿤
    ֤ޤꥢϤƤޤ

    ݤ˼Ԥ㳰 NoMemoryError ȯޤ

@@@@@ok ALLOC
: type* ALLOC(type)
    sizeof(type) ХȤΥݤƬؤΥݥ󥿤
    ֤ޤꥢϤƤޤ

    ݤ˼Ԥ㳰 NoMemoryError ȯޤ

