mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
35eb899004
commit
597d60f792
1 changed files with 6 additions and 4 deletions
|
@ -65,10 +65,12 @@ module DL
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_last_error
|
def test_last_error
|
||||||
|
Thread.new do
|
||||||
f = Function.new(@cf, [TYPE_VOIDP, TYPE_VOIDP])
|
f = Function.new(@cf, [TYPE_VOIDP, TYPE_VOIDP])
|
||||||
assert_nil CFunc.last_error
|
assert_nil CFunc.last_error
|
||||||
str = f.call("000", "123")
|
str = f.call("000", "123")
|
||||||
assert_not_nil CFunc.last_error
|
assert_not_nil CFunc.last_error
|
||||||
|
end.join
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue