summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-15 11:42:51 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-15 11:42:51 +0000
commit99a04c1adfef7da4f4d626d744381c99d42e2a77 (patch)
tree27d9106c6726271f2721036fe9f6b1ab59eb8811 /error.c
parent61817f40af29cdf56c6bb64182f699c662895231 (diff)
* class.c, error.c, eval.c, intern.h, object.c, variable.c:
do not set path if it is a singleton class. [ruby-dev:22588] (backport from 1.9) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/error.c b/error.c
index 59ec066b94..06fb929132 100644
--- a/error.c
+++ b/error.c
@@ -400,7 +400,7 @@ exc_to_s(exc)
{
VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
- if (NIL_P(mesg)) return rb_class_path(CLASS_OF(exc));
+ if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
return mesg;
}
@@ -439,11 +439,11 @@ exc_inspect(exc)
klass = CLASS_OF(exc);
exc = rb_obj_as_string(exc);
if (RSTRING(exc)->len == 0) {
- return rb_str_dup(rb_class_path(klass));
+ return rb_str_dup(rb_class_name(klass));
}
str = rb_str_buf_new2("#<");
- klass = rb_class_path(klass);
+ klass = rb_class_name(klass);
rb_str_buf_append(str, klass);
rb_str_buf_cat(str, ": ", 2);
rb_str_buf_append(str, exc);
@@ -645,7 +645,7 @@ name_err_to_s(exc)
{
VALUE mesg = rb_attr_get(exc, rb_intern("mesg")), str = mesg;
- if (NIL_P(mesg)) return rb_class_path(CLASS_OF(exc));
+ if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
StringValue(str);
if (str != mesg) {
rb_iv_set(exc, "mesg", mesg = str);