Forum: Ruby ruby_top_self in 1.9

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Roger P. (Guest)
on 2009-06-07 07:43
with ruby 1.8 C code, I can (apparently) do the following to define a
top level method called "go"

file Test3.c

static void toplevel_scope_1(VALUE self, NODE *cref) {
  VALUE s_class = (cref)->nd_clss;
  rb_define_private_method(s_class, "go", method_1, -1);

void Init_test3() {
  NODE *cref = rb_node_newnode(NODE_CREF, rb_cObject, 0, 0);
  toplevel_scope_1(ruby_top_self, cref);

So anybody have any clues how to do that in 1.9?
This topic is locked and can not be replied to.