From: matz@... (Yukihiro Matsumoto) Date: 1998-01-23T14:19:23+09:00 Subject: [ruby-dev:1322] Re: [MethodIndex] Bug and question まつもと ゆきひろです In message "[ruby-dev:1321] Re: [MethodIndex] Bug and question" on 98/01/23, Yukihiro Matsumoto writes: |まつもと ゆきひろです |バグです.Errno以下のクラス名を取り出すとクラスが初期化され |ていない文字列を返していました.パッチを付けておきます. パッチ付け忘れました. RCS file: /home/cvsroot/ruby/error.c,v retrieving revision 1.1.1.2.2.1 diff -u -1 -r1.1.1.2.2.1 error.c --- error.c 1998/01/16 12:35:44 1.1.1.2.2.1 +++ error.c 1998/01/23 04:56:20 @@ -256,3 +256,3 @@ if (RSTRING(exc)->len == 0) { - return rb_class_path(klass); + return str_dup(rb_class_path(klass)); } Index: object.c =================================================================== RCS file: /home/cvsroot/ruby/object.c,v retrieving revision 1.1.1.2.2.2 diff -u -1 -r1.1.1.2.2.2 object.c --- object.c 1998/01/22 10:07:52 1.1.1.2.2.2 +++ object.c 1998/01/23 04:56:19 @@ -388,3 +388,3 @@ { - return rb_class_path(class); + return str_dup(rb_class_path(class)); } Index: variable.c =================================================================== RCS file: /home/cvsroot/ruby/variable.c,v retrieving revision 1.1.1.2.2.2 diff -u -1 -r1.1.1.2.2.2 variable.c --- variable.c 1998/01/19 05:08:21 1.1.1.2.2.2 +++ variable.c 1998/01/23 04:56:18 @@ -133,8 +133,2 @@ if (NIL_P(path)) { - path = rb_iv_get(klass, "__classid__"); - if (!NIL_P(path)) { - path = str_new2(rb_id2name(FIX2INT(path))); - } - } - if (NIL_P(path)) { path = find_class_path(klass); @@ -155,3 +149,3 @@ - if (path) return path; + if (path) return str_dup(path); return str_new(0,0); @@ -211,8 +205,3 @@ - if (cString) { - rb_iv_set(klass, "__classpath__", str_new2(rb_id2name(id))); - } - else { - rb_iv_set(klass, "__classid__", INT2FIX(id)); - } + rb_iv_set(klass, "__classpath__", str_new2(rb_id2name(id))); }