Class: TkKernel

Inherits:
Object show all
Defined in:
ext/tk/tkutil/tkutil.c

Direct Known Subclasses

TkCallbackEntry, TkObject

Class Method Summary collapse

Class Method Details

.new(*args) ⇒ Object




133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'ext/tk/tkutil/tkutil.c', line 133

static VALUE
tk_s_new(int argc, VALUE *argv, VALUE klass)
{
    VALUE obj = rb_class_new_instance(argc, argv, klass);

    if (rb_block_given_p()) {
#ifndef HAVE_RB_OBJ_INSTANCE_EXEC
      rb_obj_instance_eval(0, 0, obj);
#else
      rb_obj_instance_exec(1, &obj, obj);
#endif
    }
    return obj;
}