new(p1) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
static VALUE
generator_initialize(int argc, VALUE *argv, VALUE obj)
    VALUE proc;

    if (argc == 0) {

        proc = rb_block_proc();
    else {
        rb_scan_args(argc, argv, "1", &proc);

        if (!rb_obj_is_proc(proc))
                     "wrong argument type %s (expected Proc)",

        if (rb_block_given_p()) {
            rb_warn("given block not used");

    return generator_init(obj, proc);
Register or log in to add new notes.