summaryrefslogtreecommitdiff
path: root/test/dl
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-09 01:57:54 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-09 01:57:54 +0000
commit1b979ea7218e2fccc3f37fa12c57b56ee2f9380b (patch)
treee019db8a378e091070f46b4394bb545b4a28342c /test/dl
parent7021db80f3927faf596ee261e196656a7b5b38d9 (diff)
* test/dl/test_callback.rb: fixing valgrind errors. Ruby string may be
GC'd before the callback returns. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl')
-rw-r--r--test/dl/test_callback.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/dl/test_callback.rb b/test/dl/test_callback.rb
index 844e8f543a..ed3be661e7 100644
--- a/test/dl/test_callback.rb
+++ b/test/dl/test_callback.rb
@@ -29,8 +29,9 @@ module DL
end
def test_callback_return_arbitrary
+ foo = 'foo'
addr = set_callback(TYPE_VOIDP, 1) do |ptr|
- CPtr['foo'].to_i
+ CPtr[foo].to_i
end
func = CFunc.new(addr, TYPE_VOIDP, 'test')
f = Function.new(func, [TYPE_VOIDP])