diff options
Diffstat (limited to 'ext/ffi_yajl/ext')
-rw-r--r-- | ext/ffi_yajl/ext/dlopen/dlopen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/ffi_yajl/ext/dlopen/dlopen.c b/ext/ffi_yajl/ext/dlopen/dlopen.c index 7330763..eb81a21 100644 --- a/ext/ffi_yajl/ext/dlopen/dlopen.c +++ b/ext/ffi_yajl/ext/dlopen/dlopen.c @@ -26,7 +26,9 @@ static VALUE mFFI_Yajl, mDlopen, mExt; static VALUE mDlopen_dlopen(VALUE self, VALUE file) { - dlopen(RSTRING_PTR(file), RTLD_NOW|RTLD_GLOBAL); + if (dlopen(RSTRING_PTR(file), RTLD_NOW|RTLD_GLOBAL) == NULL) { + rb_raise(rb_eArgError, "%s", dlerror()); + } return Qnil; } |