From f1ff09fbf62a1db3991efef5c1d0e53feffdfb6b Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 5 Aug 2008 20:08:33 +0000 Subject: * array.c (rb_ary_sort_bang): reset to real class. * file.c (rb_find_file_ext, rb_find_file): ditto. * io.c (io_reopen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 6888ad0ea3..970875f946 100644 --- a/file.c +++ b/file.c @@ -4506,7 +4506,7 @@ rb_find_file_ext(VALUE *filep, const char *const *ext) if (RSTRING_LEN(str) == 0) continue; file_expand_path(fname, str, tmp); if (file_load_ok(RSTRING_PTR(tmp))) { - RBASIC(tmp)->klass = RBASIC(*filep)->klass; + RBASIC(tmp)->klass = rb_obj_class(*filep); OBJ_FREEZE(tmp); *filep = tmp; return j+1; @@ -4572,7 +4572,7 @@ rb_find_file(VALUE path) } return 0; found: - RBASIC(tmp)->klass = RBASIC(path)->klass; + RBASIC(tmp)->klass = rb_obj_class(path); OBJ_FREEZE(tmp); } else { -- cgit v1.2.3