1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm_backtrace.c: use rb_id2str

* vm_backtrace.c (location_base_label): convert ID to string
  directly, and the return value is frozen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-04-14 03:33:00 +00:00
parent 523ecd29b8
commit 2df3e8de58

View file

@ -208,7 +208,7 @@ location_base_label(rb_backtrace_location_t *loc)
case LOCATION_TYPE_ISEQ_CALCED:
return loc->body.iseq.iseq->location.base_label;
case LOCATION_TYPE_CFUNC:
return rb_sym_to_s(ID2SYM(loc->body.cfunc.mid));
return rb_id2str(loc->body.cfunc.mid);
case LOCATION_TYPE_IFUNC:
default:
rb_bug("location_base_label: unreachable");