summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-13 09:10:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-13 09:10:12 +0000
commitd40ef8a85c271c3570e778fb74f53d6401281a9d (patch)
tree4fc0d2b7ce2c330a966d3a4b8b42f2ec0cb7fed6 /proc.c
parent4e5d0cee76dc263549958e2f08ea010a5cbd79b4 (diff)
proc.c: show the given name
* proc.c (method_inspect): show the given name primarily, and original_id if aliased. [ruby-core:52048] [Bug #7806] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/proc.c b/proc.c
index 21fd22d95e..6951562b27 100644
--- a/proc.c
+++ b/proc.c
@@ -1958,7 +1958,11 @@ method_inspect(VALUE method)
}
}
rb_str_buf_cat2(str, sharp);
- rb_str_append(str, rb_id2str(data->me->def->original_id));
+ rb_str_append(str, rb_id2str(data->id));
+ if (data->id != data->me->def->original_id) {
+ rb_str_catf(str, "(%"PRIsVALUE")",
+ rb_id2str(data->me->def->original_id));
+ }
if (data->me->def->type == VM_METHOD_TYPE_NOTIMPLEMENTED) {
rb_str_buf_cat2(str, " (not-implemented)");
}