Skip to content

Commit

Permalink
Use nil<>() properly
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Jan 28, 2012
1 parent fe3eca7 commit 0f8bb8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vm/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace rubinius {

Exception* exc = vm_->interrupted_exception_.get();
if(!exc->nil_p()) {
vm_->interrupted_exception_.set((Exception*)cNil);
vm_->interrupted_exception_.set(nil<Exception>());

// Only write the locations if there are none.
if(exc->locations()->nil_p() || exc->locations()->size() == 0) {
Expand Down
4 changes: 2 additions & 2 deletions vm/test/test_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class TestIO : public CxxTest::TestSuite, public VMTest {

void test_ensure_open() {
TS_ASSERT(io->ensure_open(state)->nil_p());
io->descriptor(state, (Fixnum*)cNil);
io->descriptor(state, nil<Fixnum>());
TS_ASSERT_THROWS_ASSERT(io->ensure_open(state), const RubyException &e,
TS_ASSERT(Exception::io_error_p(state, e.exception)));
io->descriptor(state, Fixnum::from(-1));
Expand All @@ -70,7 +70,7 @@ class TestIO : public CxxTest::TestSuite, public VMTest {
}

void test_set_mode() {
io->mode(state, (Fixnum*)cNil);
io->mode(state, nil<Fixnum>());
TS_ASSERT(io->mode()->nil_p());
io->set_mode(state);
int acc_mode = fcntl(io->to_fd(), F_GETFL);
Expand Down

0 comments on commit 0f8bb8b

Please sign in to comment.