diff --git a/ChangeLog b/ChangeLog index 680424bc8b..b03ac549b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Aug 6 05:08:30 2008 Nobuyoshi Nakada + + * 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. + Wed Aug 6 03:56:39 2008 Nobuyoshi Nakada * common.mk (transcodes), tool/build-transcode: generates transcode diff --git a/array.c b/array.c index d8d09f8e96..1d2202b815 100644 --- a/array.c +++ b/array.c @@ -1562,7 +1562,7 @@ rb_ary_sort_bang(VALUE ary) RARRAY(tmp)->ptr = 0; RARRAY(tmp)->len = 0; RARRAY(tmp)->aux.capa = 0; - RBASIC(tmp)->klass = RBASIC(ary)->klass; + RBASIC(tmp)->klass = rb_cArray; } return ary; } 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 { diff --git a/io.c b/io.c index 96e75137ac..7925c7b5e4 100644 --- a/io.c +++ b/io.c @@ -4500,7 +4500,7 @@ io_reopen(VALUE io, VALUE nfile) rb_io_binmode(io); } - RBASIC(io)->klass = RBASIC(nfile)->klass; + RBASIC(io)->klass = rb_obj_class(nfile); return io; }