diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-09 03:10:29 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-09 03:10:29 +0000 |
commit | af712edd5fa91f77a19a695da2658a4928d4e278 (patch) | |
tree | 0a84d5e1d88e12d5983d1edd891afd029f051cf3 /test | |
parent | b86cfcde18cd325664d904f9b1b77d1508616cdf (diff) |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/dl/test_callback.rb | 3 |
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]) |