Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Time class #30

Open
artyomb opened this issue May 18, 2024 · 0 comments
Open

Problem with Time class #30

artyomb opened this issue May 18, 2024 · 0 comments

Comments

@artyomb
Copy link

artyomb commented May 18, 2024

Hello,
I have a strange issue with the Time class. The method now is undefined

#include <ruby.h>

int main(int argc, char **argv) {
    ruby_init();
    ruby_init_loadpath();
    rb_eval_string("begin; p Time.now; rescue =>e; p e end");
    return ruby_cleanup(0);
}

gcc main.c -o ruby_in_c -I/home/user/.rbenv/versions/3.3.1/include/ruby-3.3.0 \
                        -I/home/user/.rbenv/versions/3.3.1/include/ruby-3.3.0/x86_64-linux \
                        -L/home/user/.rbenv/versions/3.3.1/lib\
                        -lruby
LD_LIBRARY_PATH=/home/user/.rbenv/versions/3.3.1/lib ./ruby_in_c
#<NoMethodError: undefined method `now' for class Time>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant