* file.c (rb_find_file): reset to real class.

* io.c (io_reopen): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-08-05 20:10:16 +00:00
parent 530ad54d8b
commit d4c32f93e2
4 changed files with 12 additions and 5 deletions

3
file.c
View file

@ -4432,6 +4432,7 @@ rb_find_file_ext(filep, ext)
for (j=0; ext[j]; j++) {
rb_str_cat2(tmp, ext[j]);
if (file_load_ok(RSTRING_PTR(tmp))) {
rb_str_resize(tmp, 0);
fname = rb_str_dup(*filep);
rb_str_cat2(fname, ext[j]);
OBJ_FREEZE(fname);
@ -4500,7 +4501,7 @@ rb_find_file(path)
}
return 0;
found:
RBASIC(tmp)->klass = RBASIC(path)->klass;
RBASIC(tmp)->klass = rb_obj_class(path);
OBJ_FREEZE(tmp);
}
else {