ruby-changes:26675
From: usa <ko1@a...>
Date: Mon, 7 Jan 2013 15:52:14 +0900 (JST)
Subject: [ruby-changes:26675] usa:r38726 (ruby_1_9_3): merge revision(s) 38213: [Backport #7629]
usa 2013-01-07 15:52:04 +0900 (Mon, 07 Jan 2013) New Revision: 38726 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38726 Log: merge revision(s) 38213: [Backport #7629] * vm.c (rb_vm_make_proc): save the proc made from the given block so that it will not get collected. [ruby-core:50545] [Bug #7507] Modified directories: branches/ruby_1_9_3/ Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/version.h branches/ruby_1_9_3/vm.c Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 38725) +++ ruby_1_9_3/ChangeLog (revision 38726) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1 +Mon Jan 7 15:50:25 2013 Nobuyoshi Nakada <nobu@r...> + + * vm.c (rb_vm_make_proc): save the proc made from the given block so + that it will not get collected. [ruby-core:50545] [Bug #7507] + Tue Dec 25 23:35:09 2012 NARUSE, Yui <naruse@r...> * lib/mkmf.rb: fix for if config["libdir"] is nil. Index: ruby_1_9_3/vm.c =================================================================== --- ruby_1_9_3/vm.c (revision 38725) +++ ruby_1_9_3/vm.c (revision 38726) @@ -468,10 +468,18 @@ vm_collect_local_variables_in_heap(rb_th https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/vm.c#L468 } static VALUE vm_make_proc_from_block(rb_thread_t *th, rb_block_t *block); +static VALUE vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp, VALUE *blockprocptr); VALUE rb_vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp) { + VALUE blockprocval; + return vm_make_env_object(th, cfp, &blockprocval); +} + +static VALUE +vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp, VALUE *blockprocptr) +{ VALUE envval; VALUE *lfp; rb_block_t *blockptr; @@ -489,6 +497,7 @@ rb_vm_make_env_object(rb_thread_t * th, https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/vm.c#L497 rb_proc_t *p; GetProcPtr(blockprocval, p); lfp[0] = GC_GUARDED_PTR(&p->block); + *blockprocptr = blockprocval; } envval = vm_make_env_each(th, cfp, cfp->dfp, cfp->lfp); @@ -559,7 +568,7 @@ rb_vm_make_proc(rb_thread_t *th, const r https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/vm.c#L568 rb_bug("rb_vm_make_proc: Proc value is already created."); } - envval = rb_vm_make_env_object(th, cfp); + envval = vm_make_env_object(th, cfp, &blockprocval); if (PROCDEBUG) { check_env_value(envval); Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 38725) +++ ruby_1_9_3/version.h (revision 38726) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1 #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 362 +#define RUBY_PATCHLEVEL 363 -#define RUBY_RELEASE_DATE "2012-12-25" -#define RUBY_RELEASE_YEAR 2012 -#define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 25 +#define RUBY_RELEASE_DATE "2013-01-07" +#define RUBY_RELEASE_YEAR 2013 +#define RUBY_RELEASE_MONTH 1 +#define RUBY_RELEASE_DAY 7 #include "ruby/version.h" Property changes on: ruby_1_9_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r38213 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/