diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-20 13:28:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-20 13:28:18 +0000 |
commit | 9286180079614b7f953a0c6832ad38c6d5a5af9f (patch) | |
tree | b8d8894e8a76bb8d5c4c8350840ebe3294735597 /proc.c | |
parent | 51e0bcb72a332b121c524e926f0b08994fc963aa (diff) |
* proc.c (proc_new): use the given class.
* vm.c (vm_make_proc): added an argument for the class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -379,11 +379,12 @@ proc_new(VALUE klass, int is_lambda) } } - if (block->proc) { - return block->proc; + procval = block->proc; + if (procval && RBASIC(procval)->klass == klass) { + return procval; } - procval = vm_make_proc(th, cfp, block); + procval = vm_make_proc(th, cfp, block, klass); if (is_lambda) { rb_proc_t *proc; |