summaryrefslogtreecommitdiff
path: root/ext/dl/lib
diff options
context:
space:
mode:
authortarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-25 19:43:15 +0000
committertarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-25 19:43:15 +0000
commitdb4a0d42dd03b942ab86843c4286a66362cfd6ff (patch)
tree128c2499e201ab74180794689ccb8d47ffc6f800 /ext/dl/lib
parentb652b55c51779ce5f22b636e6a2106f26a2eb55b (diff)
* ext/dl/lib/dl/func.rb (call): don't overwrite original arguments
to defend from GC. * test/dl/test_func.rb (test_string): add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/lib')
-rw-r--r--ext/dl/lib/dl/func.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dl/lib/dl/func.rb b/ext/dl/lib/dl/func.rb
index 4d0db4ee7a..3c2245f413 100644
--- a/ext/dl/lib/dl/func.rb
+++ b/ext/dl/lib/dl/func.rb
@@ -55,8 +55,8 @@ module DL
super
else
funcs = []
- args = wrap_args(args, @stack.types, funcs, &block)
- r = @cfunc.call(@stack.pack(args))
+ _args = wrap_args(args, @stack.types, funcs, &block)
+ r = @cfunc.call(@stack.pack(_args))
funcs.each{|f| f.unbind_at_call()}
return wrap_result(r)
end