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)


1469
1470
1471
1472
1473
1474
1475
1476
# File 'ext/ruby_debug.c', line 1469

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)


1439
1440
1441
1442
1443
1444
1445
1446
# File 'ext/ruby_debug.c', line 1439

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.



1484
1485
1486
1487
1488
1489
1490
1491
# File 'ext/ruby_debug.c', line 1484

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)


1454
1455
1456
1457
1458
1459
1460
1461
# File 'ext/ruby_debug.c', line 1454

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

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