Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update current state object with proper VM when forking

Fixes #1678
  • Loading branch information...
commit 8d2093a37464e3a2c843d37a141c5687e3a17bae 1 parent 623ae12
@dbussink dbussink authored
Showing with 10 additions and 1 deletion.
  1. +5 −0 vm/environment.hpp
  2. +1 −1  vm/shared_state.cpp
  3. +4 −0 vm/state.hpp
View
5 vm/environment.hpp
@@ -67,6 +67,11 @@ namespace rubinius {
return argv_;
}
+ void set_root_vm(VM* vm) {
+ root_vm = vm;
+ state->set_vm(vm);
+ }
+
void setup_cpp_terminate();
void load_vm_options(int argc, char** argv);
View
2  vm/shared_state.cpp
@@ -182,7 +182,7 @@ namespace rubinius {
config.jit_inline_debug.set("no");
- env_->state = state;
+ env_->set_root_vm(state->vm());
threads_.clear();
threads_.push_back(state->vm());
View
4 vm/state.hpp
@@ -30,6 +30,10 @@ namespace rubinius {
return 0;
}
+ void set_vm(VM* vm) {
+ vm_ = vm;
+ }
+
void set_call_frame(CallFrame* cf) {
vm_->set_call_frame(cf);
}
Please sign in to comment.
Something went wrong with that request. Please try again.