Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BasicObject can refer to BasicObject from within itself.

  • Loading branch information...
commit 0bdf028c76cdf1d44ff2c93a9b4244f25c4aaf59 1 parent 570628c
Federico Ravasio razielgn authored
9 vm/builtin/basic_object.cpp
View
@@ -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);
+ }
+}
2  vm/builtin/basic_object.hpp
View
@@ -10,6 +10,8 @@ namespace rubinius {
/** Class type identifier. */
static const object_type type = BasicObjectType;
+ static void init(STATE);
+
public: /* accessors */
};
1  vm/ontology.cpp
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);
Please sign in to comment.
Something went wrong with that request. Please try again.