示例#1
0
文件: proc.c 项目: MSch/MacRuby
VALUE
rb_proc_location(VALUE self)
{
    rb_iseq_t *iseq = get_proc_iseq(self);
    VALUE loc[2];

    if (!iseq) return Qnil;
    loc[0] = iseq->filename;
    if (iseq->insn_info_table) {
	loc[1] = INT2FIX(iseq->insn_info_table[0].line_no);
    }
    else {
	loc[1] = Qnil;
    }
    return rb_ary_new4(2, loc);
}
示例#2
0
VALUE
rb_proc_location(VALUE self)
{
    return iseq_location(get_proc_iseq(self));
}