From 910cee22e9d257b5a187b26b9ddfe74e63f45583 Mon Sep 17 00:00:00 2001 From: tmm1 Date: Sun, 27 Oct 2013 22:48:34 +0000 Subject: [PATCH] * vm_backtrace.c (rb_profile_frame_classpath): do not use rb_inspect directly, since it might have a custom implementation or show ivars. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ vm_backtrace.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f76e30d715..5ce9b1e82c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 28 07:47:32 2013 Aman Gupta + + * vm_backtrace.c (rb_profile_frame_classpath): do not use rb_inspect + directly, since it might have a custom implementation or show ivars. + Mon Oct 28 04:10:41 2013 Aman Gupta * vm_backtrace.c (rb_profile_frame_classpath): handle singleton diff --git a/vm_backtrace.c b/vm_backtrace.c index 279a94e49c..541eda35cd 100644 --- a/vm_backtrace.c +++ b/vm_backtrace.c @@ -1298,7 +1298,7 @@ rb_profile_frame_classpath(VALUE frame) else if (FL_TEST(klass, FL_SINGLETON)) { klass = rb_ivar_get(klass, id__attached__); if (!RB_TYPE_P(klass, T_CLASS)) - return rb_inspect(klass); + return rb_sprintf("#<%s:%p>", rb_class2name(rb_obj_class(klass)), (void*)klass); } return rb_class_path(klass); }