summaryrefslogtreecommitdiff
path: root/ext/dl/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/handle.c')
-rw-r--r--ext/dl/handle.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 17e8e5221d0..9ca2fa0a542 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -138,7 +138,7 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
const char *name, *stype;
const char *err;
- rb_secure(4);
+ rb_secure(2);
if (rb_scan_args(argc, argv, "11", &sym, &type) == 2) {
SafeStringValue(type);
stype = StringValuePtr(type);
@@ -159,9 +159,8 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
name = StringValuePtr(sym);
}
-
Data_Get_Struct(self, struct dl_handle, dlhandle);
- if (! dlhandle->open) {
+ if (!dlhandle->open) {
rb_raise(rb_eRuntimeError, "Closed handle.");
}
handle = dlhandle->ptr;