summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-20 09:36:33 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-20 09:36:33 +0000
commite85d6f8bf96adf655627d82888527e572e030f11 (patch)
tree54fb3be0c7424b3f3b60334bf0787e11c12d81e3 /ext
parent3f084cde2b5306d2928b6d87676c5477fd30e492 (diff)
merge revision(s) 38211: [Backport #7516]
* ext/dl/lib/dl/func.rb (DL::Function#bind): When Fiddle is used, @ptr should be updated. This fixes SEGV raised in DL::Function#call after calling DL::Function#bind. [Bug #7516] [ruby-dev:46708] * test/dl/test_func.rb (test_bind): test for the above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@38502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-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 3c2245f413..3e82dcde20 100644
--- a/ext/dl/lib/dl/func.rb
+++ b/ext/dl/lib/dl/func.rb
@@ -86,6 +86,8 @@ module DL
@block.call(*args)
end
}.new(@cfunc.ctype, @args, block)
+ @ptr = @cfunc
+ return nil
else
if( !block )
raise(RuntimeError, "block must be given.")