diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-12 22:41:07 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-12 22:41:07 +0000 |
commit | 17ccd5d013fa7ffd612aea4c9babdfb37fec213d (patch) | |
tree | 9059045c3af39186da8ab06586ed45c9607ccadb /ext/dl | |
parent | d109e9a67fde86e1b3dc1cebdea318355c5c8a1b (diff) | |
download | ruby-17ccd5d013fa7ffd612aea4c9babdfb37fec213d.tar.gz |
* 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')
-rw-r--r-- | ext/dl/cptr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c index 96f318be53..b1b156a2b2 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; } |