Hi,

I want to embedd the ruby 3.3.0 interpreter into my application by using the following code:

  int error, n;

  static char* args[] = {};

  n = 0;

  ruby_sysinit(&n, (char ***)&args);

  RUBY_INIT_STACK;

  ruby_init();

  ruby_init_loadpath();

 

  rb_eval_string_protect("p Time.now", &error);

  if(error) {

    rb_eval_string("p :ERROR");

  }

In principle it does work. However, the Time class is missing the now method, thus a :ERROR is printed.

What it missing in the above code ?