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 | 250d6e87e9bd582e63a13038180acf81ff1307fc (patch) | |
tree | 9059045c3af39186da8ab06586ed45c9607ccadb /ext | |
parent | c2803f5666c231680be7e8214722fa67cef902cb (diff) | |
download | ruby-250d6e87e9bd582e63a13038180acf81ff1307fc.tar.gz ruby-250d6e87e9bd582e63a13038180acf81ff1307fc.tar.xz ruby-250d6e87e9bd582e63a13038180acf81ff1307fc.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@25742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-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 96f318be5..b1b156a2b 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; } |