summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-26 20:58:25 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-26 20:58:25 +0000
commit3c6ebfdd81caaa33a5e08f8a27294cc553271e4d (patch)
tree391a3d550aa031eb655e21137cfc062c508e0e67
parenta6235027b34d8afbcb48eeed945ad7b4e8fed1a0 (diff)
downloadruby-3c6ebfdd81caaa33a5e08f8a27294cc553271e4d.tar.gz
ruby-3c6ebfdd81caaa33a5e08f8a27294cc553271e4d.tar.xz
ruby-3c6ebfdd81caaa33a5e08f8a27294cc553271e4d.zip
* vm.c (invoke_block_from_c): return Qnil when its iseq is
SPECIAL CONST. [ruby-core:26335] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--vm.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 31d7bb3ef..4a3febde5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 27 05:56:39 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * vm.c (invoke_block_from_c): return Qnil when its iseq is
+ SPECIAL CONST. [ruby-core:26335]
+
Tue Oct 27 05:11:49 2009 NARUSE, Yui <naruse@ruby-lang.org>
* vm_exec.c (DECL_SC_REG): check defined(__asm__) before use it.
diff --git a/vm.c b/vm.c
index 066fe6f0f..91a5c6d5a 100644
--- a/vm.c
+++ b/vm.c
@@ -523,7 +523,9 @@ invoke_block_from_c(rb_thread_t *th, const rb_block_t *block,
VALUE self, int argc, const VALUE *argv,
const rb_block_t *blockptr, const NODE *cref)
{
- if (BUILTIN_TYPE(block->iseq) != T_NODE) {
+ if (SPECIAL_CONST_P(block->iseq))
+ return Qnil;
+ else if (BUILTIN_TYPE(block->iseq) != T_NODE) {
const rb_iseq_t *iseq = block->iseq;
const rb_control_frame_t *cfp;
int i, opt_pc, arg_size = iseq->arg_size;