summaryrefslogtreecommitdiff
path: root/test/dl
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-02 07:49:00 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-02 07:49:00 +0000
commit597d60f7920311ce595781d6683e5c0fe9298743 (patch)
treeea1d67d62e9d454f79fd8d2b850c79fc94ce20ca /test/dl
parent35eb899004ebd1af668e1b9e96c34f677af10cbc (diff)
* test/dl/test_cfunc.rb (test_last_error): CFunc.last_error is thread local
variable. So, if another test calls CFunc#call, it's set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl')
-rw-r--r--test/dl/test_cfunc.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/dl/test_cfunc.rb b/test/dl/test_cfunc.rb
index 209c8f3..e18a096 100644
--- a/test/dl/test_cfunc.rb
+++ b/test/dl/test_cfunc.rb
@@ -65,10 +65,12 @@ module DL
end
def test_last_error
- f = Function.new(@cf, [TYPE_VOIDP, TYPE_VOIDP])
- assert_nil CFunc.last_error
- str = f.call("000", "123")
- assert_not_nil CFunc.last_error
+ Thread.new do
+ f = Function.new(@cf, [TYPE_VOIDP, TYPE_VOIDP])
+ assert_nil CFunc.last_error
+ str = f.call("000", "123")
+ assert_not_nil CFunc.last_error
+ end.join
end
end
end