mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_backtrace.c: fix unknown ID name
* vm_backtrace.c (id2str): adapt rb_id2str which returns 0 on unknown ID to return Qnil, since oldbt_arg functions expect Qnil on unknown method names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2d1578804b
commit
2a61ff2e65
1 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,15 @@ static VALUE rb_cBacktraceLocation;
|
|||
|
||||
extern VALUE ruby_engine_name;
|
||||
|
||||
static VALUE
|
||||
id2str(ID id)
|
||||
{
|
||||
VALUE str = rb_id2str(id);
|
||||
if (!id) return Qnil;
|
||||
return str;
|
||||
}
|
||||
#define rb_id2str(id) id2str(id)
|
||||
|
||||
inline static int
|
||||
calc_lineno(const rb_iseq_t *iseq, const VALUE *pc)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue