[ruby-core:117351] embedd ruby 3.3.0 - unknown Time.now class method

27 Mar
2024
27 Mar
'24
4:22 p.m.
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 ?
493
Age (days ago)
493
Last active (days ago)
0 comments
1 participants
participants (1)
-
fiesta06