Class: UnboundMethod

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#source_locationArray, Fixnum

returns a pair of the Filename and line number on which the method is defined

returns nil if method has no associated ruby source code

Returns ].

Returns:

  • (Array, Fixnum)

    ]



107
108
109
110
111
112
113
114
115
116
117
118
# File 'ext/ruby18_source_location.c', line 107

static VALUE
method_source_location(VALUE method)
{
    struct METHOD *data;
    NODE *node;

    Data_Get_Struct(method, struct METHOD, data);
    if (node = data->body) {
        return node_source_location(node);
    }
    return Qnil;
}