Permalink
Browse files

Travis issue was a dumb initialization order issue

  • Loading branch information...
dbussink committed Jan 8, 2013
1 parent 7e451f7 commit 2e374eebf3018a8b0b8df0b5661cf51eafbe15d5
Showing with 14 additions and 14 deletions.
  1. +7 −7 vm/finalizer.cpp
  2. +7 −7 vm/objectmemory.cpp
View
@@ -134,13 +134,13 @@ namespace rubinius {
// Rubinius specific code. If the finalizer is cTrue, then
// send the object the finalize message
- //if(fi->ruby_finalizer == cTrue) {
- // fi->object->send(state, call_frame, state->symbol("__finalize__"));
- //} else {
- // Array* ary = Array::create(state, 1);
- // ary->set(state, 0, fi->object->id(state));
- // fi->ruby_finalizer->send(state, call_frame, G(sym_call), ary);
- //}
+ if(fi->ruby_finalizer == cTrue) {
+ fi->object->send(state, call_frame, state->symbol("__finalize__"));
+ } else {
+ Array* ary = Array::create(state, 1);
+ ary->set(state, 0, fi->object->id(state));
+ fi->ruby_finalizer->send(state, call_frame, G(sym_call), ary);
+ }
}
if(fi->finalizer) {
View
@@ -988,13 +988,13 @@ namespace rubinius {
if(fi.ruby_finalizer) {
// Rubinius specific code. If the finalizer is cTrue, then
// send the object the finalize message
- // if(fi.ruby_finalizer == cTrue) {
- // fi.object->send(state, 0, state->symbol("__finalize__"));
- // } else {
- // Array* ary = Array::create(state, 1);
- // ary->set(state, 0, fi.object->id(state));
- // fi.ruby_finalizer->send(state, 0, G(sym_call), ary);
- // }
+ if(fi.ruby_finalizer == cTrue) {
+ fi.object->send(state, 0, state->symbol("__finalize__"));
+ } else {
+ Array* ary = Array::create(state, 1);
+ ary->set(state, 0, fi.object->id(state));
+ fi.ruby_finalizer->send(state, 0, G(sym_call), ary);
+ }
}
if(fi.finalizer) {
(*fi.finalizer)(state, fi.object);

0 comments on commit 2e374ee

Please sign in to comment.