Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Assert that whenever we see a Data object it has a handle

Data objects should always have a handle, so when one doesn't that is a
bug.
  • Loading branch information...
commit f5e638a563d2c64a60efcc6a039139e8671ba509 1 parent f863122
@dbussink dbussink authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  vm/builtin/nativemethod.cpp
View
2  vm/builtin/nativemethod.cpp
@@ -14,6 +14,7 @@
#include "on_stack.hpp"
#include "builtin/array.hpp"
+#include "builtin/data.hpp"
#include "builtin/exception.hpp"
#include "builtin/nativemethod.hpp"
#include "builtin/string.hpp"
@@ -73,6 +74,7 @@ namespace rubinius {
handle->update(NativeMethodEnvironment::get());
}
} else {
+ assert(!try_as<Data>(obj));
handle = state->shared().add_global_handle(state, obj);
handles_.add_if_absent(handle);
}
Please sign in to comment.
Something went wrong with that request. Please try again.