summaryrefslogtreecommitdiff
path: root/ext/dl/cptr.c
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-12 22:41:07 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-12 22:41:07 +0000
commit17ccd5d013fa7ffd612aea4c9babdfb37fec213d (patch)
tree9059045c3af39186da8ab06586ed45c9607ccadb /ext/dl/cptr.c
parentd109e9a67fde86e1b3dc1cebdea318355c5c8a1b (diff)
* ext/dl/cptr.c (rb_dlptr_s_to_ptr): when wrapping a pointer it should
keep a reference to the object it's wrapping * test/dl/test_func.rb use standard test methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/cptr.c')
-rw-r--r--ext/dl/cptr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 96f318be539..b1b156a2b26 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -608,6 +608,7 @@ rb_dlptr_s_to_ptr(VALUE self, VALUE val)
ptr = rb_dlptr_new(NUM2PTR(rb_Integer(val)), 0, NULL);
}
OBJ_INFECT(ptr, val);
+ rb_iv_set(ptr, "wrapping", val);
return ptr;
}