diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-08 09:14:59 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-08 09:14:59 +0000 |
| commit | 622012a2aee85aba982213b69bef6caa303ea91a (patch) | |
| tree | dbf3fa9724e2a29f568c8ccb753aabc4be497721 | |
| parent | 7ee2e982fc0ba1b414c21480f83c880700f4aebb (diff) | |
| download | ruby-622012a2aee85aba982213b69bef6caa303ea91a.tar.gz ruby-622012a2aee85aba982213b69bef6caa303ea91a.tar.xz ruby-622012a2aee85aba982213b69bef6caa303ea91a.zip | |
* 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).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | re.c | 8 | ||||
| -rw-r--r-- | vm.c | 1 |
3 files changed, 12 insertions, 5 deletions
@@ -1,3 +1,11 @@ +Mon Sep 8 18:13:13 2008 Tanaka Akira <akr@fsij.org> + + * 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@ruby-lang.org> * win32/Makefile.sub (config.h): define SIZE_MAX for VC++6/7. @@ -2249,15 +2249,13 @@ rb_reg_preprocess_dregexp(VALUE ary) 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; @@ -1820,6 +1820,7 @@ Init_VM(void) 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 */ |
