aboutsummaryrefslogtreecommitdiffstats
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-02 15:29:58 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-02 15:29:58 +0000
commit04bb0b570e742e48da88a6c27004ee67d906bff6 (patch)
treea467989394e6c21edf914a3b992df84b945a5704 /vm_core.h
parent945181ed2e58c4333a91e43aa89cef3bae45a265 (diff)
downloadruby-04bb0b570e742e48da88a6c27004ee67d906bff6.tar.gz
check an existence of block.
* gc.c (rb_raw_obj_info): check block before using it. * vm_core.h (vm_block_iseq): r61565 introduced NULL check but this check is only needed by `rb_raw_obj_info()` and it is called at GC debug mode. Above fix for `rb_raw_obj_info()` solves this problem and NULL check should not be needed any more. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index f2ea983d36..3691d13fa5 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1406,7 +1406,6 @@ vm_proc_ep(VALUE procval)
static inline const rb_iseq_t *
vm_block_iseq(const struct rb_block *block)
{
- if (!block) return NULL;
switch (vm_block_type(block)) {
case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
case block_type_proc: return vm_proc_iseq(block->as.proc);