summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl')
-rw-r--r--ext/dl/cptr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index c2fb605..02535f3 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -622,7 +622,7 @@ rb_dlptr_s_to_ptr(VALUE self, VALUE val)
}
else{
VALUE num = rb_Integer(val);
- if (num != val) wrap = 0;
+ if (num == val) wrap = 0;
ptr = rb_dlptr_new(NUM2PTR(num), 0, NULL);
}
OBJ_INFECT(ptr, val);