Class: Debugger::Context::Frame

Inherits:
Object
  • Object
show all
Defined in:
ext/ruby_debug.c

Instance Method Summary collapse

Instance Method Details

#bindingBinding

Returns the binding captured at the moment this frame was created.

Returns:

  • (Binding)


1259
1260
1261
1262
1263
1264
1265
1266
# File 'ext/ruby_debug.c', line 1259

static VALUE
frame_binding(VALUE self)
{
    debug_frame_t *debug_frame;

    Data_Get_Struct(self, debug_frame_t, debug_frame);
    return debug_frame->binding;
}

#fileString

Returns the name of the file.

Returns:

  • (String)


1229
1230
1231
1232
1233
1234
1235
1236
# File 'ext/ruby_debug.c', line 1229

static VALUE
frame_file(VALUE self)
{
    debug_frame_t *debug_frame;

    Data_Get_Struct(self, debug_frame_t, debug_frame);
    return debug_frame->file;
}

#idObject

Returns the sym of the called method.



1274
1275
1276
1277
1278
1279
1280
1281
# File 'ext/ruby_debug.c', line 1274

static VALUE
frame_id(VALUE self)
{
    debug_frame_t *debug_frame;

    Data_Get_Struct(self, debug_frame_t, debug_frame);
    return debug_frame->id ? ID2SYM(debug_frame->id): Qnil;
}

#lineInteger

Returns the line number in the file.

Returns:

  • (Integer)


1244
1245
1246
1247
1248
1249
1250
1251
# File 'ext/ruby_debug.c', line 1244

static VALUE
frame_line(VALUE self)
{
    debug_frame_t *debug_frame;

    Data_Get_Struct(self, debug_frame_t, debug_frame);
    return debug_frame->line;
}