diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-25 09:16:25 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-25 09:16:25 +0000 |
commit | 6d47b8a9cc988bb210fc44ce991a0212d97296e4 (patch) | |
tree | 62abd8947818da9f117b0f2fe552b8b6f6c43a33 /object.c | |
parent | aaa30fd040781355739b5cceb372df46851a2f5b (diff) | |
download | ruby-6d47b8a9cc988bb210fc44ce991a0212d97296e4.tar.gz |
* eval.c (method_inspect): should not dump core for unbound
singleton methods.
* object.c (rb_mod_to_s): better description.
* hash.c (env_select): should path the assoc list.
* process.c (rb_syswait): thread kludge; should be fixed to
support native thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -500,9 +500,17 @@ rb_mod_to_s(klass) { if (FL_TEST(klass, FL_SINGLETON)) { VALUE s = rb_str_new2("#<"); + VALUE v = rb_iv_get(klass, "__attached__"); rb_str_cat2(s, "Class:"); - rb_str_cat2(s, rb_class2name(klass)); + switch (TYPE(v)) { + case T_CLASS: case T_MODULE: + rb_str_append(s, rb_inspect(v)); + break; + default: + rb_str_append(s, rb_any_to_s(v)); + break; + } rb_str_cat2(s, ">"); return s; |