diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-19 00:12:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-19 00:12:47 +0000 |
commit | 6f22777fcf1612052c7f2884935f805d53f991d1 (patch) | |
tree | bb731f939a2691f3feb4da2d277671da01b49745 /vm.c | |
parent | ea31b6c0e47ebb40769abe835a15d5e436f841be (diff) |
vm.c: check TOPLEVEL_BINDING
* vm.c (vm_set_main_stack): TOPLEVEL_BINDING must be built.
http://www.viva64.com/en/b/0414/#ID0EQ1CI [ruby-core:76973]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -459,11 +459,12 @@ vm_set_main_stack(rb_thread_t *th, const rb_iseq_t *iseq) rb_binding_t *bind; GetBindingPtr(toplevel_binding, bind); + RUBY_ASSERT_MESG(bind, "TOPLEVEL_BINDING is not built"); vm_set_eval_stack(th, iseq, 0, &bind->block); /* save binding */ - if (bind && iseq->body->local_table_size > 0) { + if (iseq->body->local_table_size > 0) { vm_bind_update_env(bind, vm_make_env_object(th, th->cfp)); } } |