summaryrefslogtreecommitdiff
path: root/ext/objspace/object_tracing.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-03 01:56:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-03 01:56:16 +0000
commit27c4fb3361d0e731d2deff6093ebd33b69231323 (patch)
tree367d35fbab506ca4838d9157560d2090828271f5 /ext/objspace/object_tracing.c
parent1d670ab0f090c0232e2a7a619b70ebb559453331 (diff)
ext: get rid of inadvertent ID creation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/objspace/object_tracing.c')
-rw-r--r--ext/objspace/object_tracing.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/objspace/object_tracing.c b/ext/objspace/object_tracing.c
index 45b06aef8c..975518c654 100644
--- a/ext/objspace/object_tracing.c
+++ b/ext/objspace/object_tracing.c
@@ -287,7 +287,10 @@ object_allocations_reporter_i(st_data_t key, st_data_t val, st_data_t ptr)
if (info->class_path) fprintf(out, "C: %s", info->class_path);
else fprintf(out, "C: %p", (void *)info->klass);
fprintf(out, "@%s:%lu", info->path ? info->path : "", info->line);
- if (!NIL_P(info->mid)) fprintf(out, " (%s)", rb_id2name(SYM2ID(info->mid)));
+ if (!NIL_P(info->mid)) {
+ VALUE m = rb_sym2str(info->mid);
+ fprintf(out, " (%s)", RSTRING_PTR(m));
+ }
fprintf(out, ")\n");
return ST_CONTINUE;