Permalink
Browse files

BasicObject can refer to BasicObject from within itself.

  • Loading branch information...
1 parent 570628c commit 0bdf028c76cdf1d44ff2c93a9b4244f25c4aaf59 @razielgn razielgn committed Feb 8, 2014
Showing with 12 additions and 0 deletions.
  1. +9 −0 vm/builtin/basic_object.cpp
  2. +2 −0 vm/builtin/basic_object.hpp
  3. +1 −0 vm/ontology.cpp
@@ -0,0 +1,9 @@
+#include "builtin/basic_object.hpp"
+#include "builtin/class.hpp"
+
+namespace rubinius {
+ void BasicObject::init(STATE) {
+ Class* basic_object = G(basicobject);
+ basic_object->set_const(state, state->symbol("BasicObject"), basic_object);
+ }
+}
@@ -10,6 +10,8 @@ namespace rubinius {
/** Class type identifier. */
static const object_type type = BasicObjectType;
+ static void init(STATE);
+
public: /* accessors */
};
View
@@ -315,6 +315,7 @@ namespace rubinius {
// Let all the builtin classes initialize themselves. this
// typically means creating a Ruby class.
+ BasicObject::init(state);
CompactLookupTable::init(state);
ByteArray::init(state);
String::init(state);

0 comments on commit 0bdf028

Please sign in to comment.