diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-02 07:49:00 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-02 07:49:00 +0000 |
commit | 597d60f7920311ce595781d6683e5c0fe9298743 (patch) | |
tree | ea1d67d62e9d454f79fd8d2b850c79fc94ce20ca /test | |
parent | 35eb899004ebd1af668e1b9e96c34f677af10cbc (diff) | |
download | ruby-597d60f7920311ce595781d6683e5c0fe9298743.tar.gz |
* 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')
-rw-r--r-- | test/dl/test_cfunc.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/dl/test_cfunc.rb b/test/dl/test_cfunc.rb index 209c8f3731..e18a096611 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 |