Skip to content

Commit

Permalink
Implement VM::current_thread().
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Aug 2, 2008
1 parent 2366ead commit 6f546f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions vm/test/test_vm.hpp
Expand Up @@ -75,4 +75,10 @@ class TestVM : public CxxTest::TestSuite {
// state->om->young.total_objects << ")" << std::endl;
}

void test_current_thread() {
OBJECT current_thread = state->globals.current_thread.get();

TS_ASSERT_EQUALS(state->current_thread(), current_thread);
}

};
2 changes: 1 addition & 1 deletion vm/vm.cpp
Expand Up @@ -62,7 +62,7 @@ namespace rubinius {
}

OBJECT VM::current_thread() {
return Qnil;
return globals.current_thread.get();
}

void VM::collect() {
Expand Down

0 comments on commit 6f546f0

Please sign in to comment.