ruby-changes:7720
From: akr <ko1@a...>
Date: Mon, 8 Sep 2008 18:15:26 +0900 (JST)
Subject: [ruby-changes:7720] Ruby:r19241 (trunk): * vm.c (rb_mRubyVMFrozenCore): registered for GC.
akr 2008-09-08 18:14:59 +0900 (Mon, 08 Sep 2008) New Revision: 19241 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19241 Log: * vm.c (rb_mRubyVMFrozenCore): registered for GC. * re.c (rb_reg_preprocess_dregexp): fix GC problem on MacOS X with powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367). Modified files: trunk/ChangeLog trunk/re.c trunk/vm.c Index: re.c =================================================================== --- re.c (revision 19240) +++ re.c (revision 19241) @@ -2249,15 +2249,13 @@ onig_errmsg_buffer err = ""; int i; VALUE result = 0; - int argc = RARRAY_LEN(ary); - VALUE *argv = RARRAY_PTR(ary); - if (argc == 0) { + if (RARRAY_LEN(ary) == 0) { rb_raise(rb_eArgError, "no arguments given"); } - for (i = 0; i < argc; i++) { - VALUE str = argv[i]; + for (i = 0; i < RARRAY_LEN(ary); i++) { + VALUE str = RARRAY_PTR(ary)[i]; VALUE buf; char *p, *end; rb_encoding *src_enc; Index: ChangeLog =================================================================== --- ChangeLog (revision 19240) +++ ChangeLog (revision 19241) @@ -1,3 +1,11 @@ +Mon Sep 8 18:13:13 2008 Tanaka Akira <akr@f...> + + * vm.c (rb_mRubyVMFrozenCore): registered for GC. + + * re.c (rb_reg_preprocess_dregexp): fix GC problem on MacOS X with + powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. + build 5367). + Mon Sep 8 18:09:07 2008 NAKAMURA Usaku <usa@r...> * win32/Makefile.sub (config.h): define SIZE_MAX for VC++6/7. Index: vm.c =================================================================== --- vm.c (revision 19240) +++ vm.c (revision 19241) @@ -1820,6 +1820,7 @@ rb_define_method_id(klass, id_core_define_singleton_method, m_core_define_singleton_method, 3); rb_define_method_id(klass, id_core_set_postexe, m_core_set_postexe, 1); rb_obj_freeze(fcore); + rb_global_variable(&rb_mRubyVMFrozenCore); rb_mRubyVMFrozenCore = fcore; /* ::VM::Env */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/