Subject:
[ruby-ffi] calling internal ruby functions
From:
mixtli
Date:
4/29/11 3:41 AM
To:
ruby-ffi

I wanted to call rb_thread_select to do some async polling, so I made
a quick wrapper.  It actually works fine, but I have to specify the
full path to my libruby.dylib in the call to ffi_lib.   If I just put
"libruby", it segfaults.   Is there some standard mechanism for
forcing ffi to use the libs from the rvm environment?   This is for a
public gem (http://github.com/mixtli/net-snmp), so I'd like it to
automagically work in the user's environment.

Also, is there a standard set of wrappers for ruby internals similar
to the set for libc (ffi-libc)?

And finally, since I'm here..  Anyone else having problems requiring
ffi-libc on snow leopard?  A bunch of the functions don't seem to be
defined on my system (clearenv, stdin, etc).