Skip to content

Commit

Permalink
Only call internalize when there's no machine code
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Feb 10, 2013
1 parent c1a7314 commit 67567f4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vm/builtin/block_environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,13 @@ namespace rubinius {

state->set_call_frame(call_frame);

MachineCode* mcode = ccode->internalize(state, gct);
MachineCode* mcode = ccode->machine_code();
if(!mcode) {
Exception::internal_error(state, call_frame, "invalid bytecode method");
return 0;
mcode = ccode->internalize(state, gct);
if(!mcode) {
Exception::internal_error(state, call_frame, "invalid bytecode method");
return 0;
}
}

mcode->set_parent(caller);
Expand Down

0 comments on commit 67567f4

Please sign in to comment.