summaryrefslogtreecommitdiff
path: root/ext/dl/lib/dl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/lib/dl')
-rw-r--r--ext/dl/lib/dl/func.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/dl/lib/dl/func.rb b/ext/dl/lib/dl/func.rb
index 1288573..69b6ad3 100644
--- a/ext/dl/lib/dl/func.rb
+++ b/ext/dl/lib/dl/func.rb
@@ -118,6 +118,8 @@ module DL
@block.call(*args)
end
}.new(@cfunc.ctype, @args, abi, name, block)
+ @ptr = @cfunc
+ return nil
else
if( !block )
raise(RuntimeError, "block must be given.")