objspace_dump.c: Handle allocation path and line missing
This commit is contained in:
parent
383685b52b
commit
6ca3d1af33
Notes:
git
2021-01-21 03:48:44 +09:00
@ -471,10 +471,15 @@ dump_object(VALUE obj, struct dump_config *dc)
|
|||||||
dump_append(dc, "]");
|
dump_append(dc, "]");
|
||||||
|
|
||||||
if (ainfo) {
|
if (ainfo) {
|
||||||
|
if (ainfo->path) {
|
||||||
dump_append(dc, ", \"file\":\"");
|
dump_append(dc, ", \"file\":\"");
|
||||||
dump_append(dc, ainfo->path);
|
dump_append(dc, ainfo->path);
|
||||||
dump_append(dc, "\", \"line\":");
|
dump_append(dc, "\"");
|
||||||
|
}
|
||||||
|
if (ainfo->line) {
|
||||||
|
dump_append(dc, ", \"line\":");
|
||||||
dump_append_lu(dc, ainfo->line);
|
dump_append_lu(dc, ainfo->line);
|
||||||
|
}
|
||||||
if (RTEST(ainfo->mid)) {
|
if (RTEST(ainfo->mid)) {
|
||||||
VALUE m = rb_sym2str(ainfo->mid);
|
VALUE m = rb_sym2str(ainfo->mid);
|
||||||
dump_append(dc, ", \"method\":");
|
dump_append(dc, ", \"method\":");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user