1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merges r27695 from trunk into ruby_1_9_2.

--
* 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/branches/ruby_1_9_2@27700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2010-05-09 03:10:29 +00:00
parent b86cfcde18
commit af712edd5f

View file

@ -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])