/* * call-seq: * context.frame_class(frame) -> obj * * Returns the real class of the frame. * It could be different than context.frame_self(frame).class */ static VALUE context_frame_class(VALUE self, VALUE frame) { debug_context_t *debug_context; debug_frame_t *debug_frame; VALUE klass; debug_check_started(); Data_Get_Struct(self, debug_context_t, debug_context); debug_frame = GET_FRAME; if(CTX_FL_TEST(debug_context, CTX_FL_DEAD)) return Qnil; klass = debug_frame->info.runtime.frame->last_class; klass = real_class(klass); if(TYPE(klass) == T_CLASS || TYPE(klass) == T_MODULE) return klass; return Qnil; }