1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merges r30601 from trunk into ruby_1_9_2.

--
    * proc.c (proc_call): Add gc guard to avoid segfault. The fix
      is created by Tomoyuki Chikanaga. [Bug #4238][ruby-dev:42963]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2011-01-28 02:25:26 +00:00
parent ac525f596c
commit a0e5aea08a
3 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Wed Jan 19 13:04:16 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* proc.c (proc_call): Add gc guard to avoid segfault. The fix
is created by Tomoyuki Chikanaga. [Bug #4238][ruby-dev:42963]
Tue Jan 18 23:31:01 2011 Yusuke Endoh <mame@tsg.ne.jp>
* parse.y: avoid NULL reference. [ruby-dev:43067]

10
proc.c
View file

@ -540,16 +540,16 @@ proc_call(int argc, VALUE *argv, VALUE procval)
rb_proc_t *proc;
rb_block_t *blockptr = 0;
rb_iseq_t *iseq;
VALUE passed_procval;
GetProcPtr(procval, proc);
iseq = proc->block.iseq;
if (BUILTIN_TYPE(iseq) == T_NODE || iseq->arg_block != -1) {
if (rb_block_given_p()) {
rb_proc_t *proc;
VALUE procval;
procval = rb_block_proc();
GetProcPtr(procval, proc);
blockptr = &proc->block;
rb_proc_t *passed_proc;
RB_GC_GUARD(passed_procval) = rb_block_proc();
GetProcPtr(passed_procval, passed_proc);
blockptr = &passed_proc->block;
}
}

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
#define RUBY_PATCHLEVEL 167
#define RUBY_PATCHLEVEL 168
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1