mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
* variable.c (rb_const_set): show the previous definition
location. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3e0819c66a
commit
bc2a1f2a98
7 changed files with 40 additions and 1 deletions
14
vm.c
14
vm.c
|
@ -829,6 +829,20 @@ vm_backtrace(rb_thread_t *th, int lev)
|
|||
return rb_ary_reverse(ary);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_sourcefilename(void)
|
||||
{
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
|
||||
|
||||
if (cfp) {
|
||||
return cfp->iseq->filename;
|
||||
}
|
||||
else {
|
||||
return Qnil;
|
||||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
rb_sourcefile(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue