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)


1664
1665
1666
1667
1668
1669
1670
1671
# File 'ext/ruby_debug.c', line 1664

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)


1634
1635
1636
1637
1638
1639
1640
1641
# File 'ext/ruby_debug.c', line 1634

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

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

#idObject

Returns the sym of the called method.



1679
1680
1681
1682
1683
1684
1685
1686
# File 'ext/ruby_debug.c', line 1679

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)


1649
1650
1651
1652
1653
1654
1655
1656
# File 'ext/ruby_debug.c', line 1649

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

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