1
0
Fork 0
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:
usa 2010-06-02 07:49:00 +00:00
parent 35eb899004
commit 597d60f792

View file

@ -65,10 +65,12 @@ module DL
end end
def test_last_error def test_last_error
f = Function.new(@cf, [TYPE_VOIDP, TYPE_VOIDP]) Thread.new do
assert_nil CFunc.last_error f = Function.new(@cf, [TYPE_VOIDP, TYPE_VOIDP])
str = f.call("000", "123") assert_nil CFunc.last_error
assert_not_nil CFunc.last_error str = f.call("000", "123")
assert_not_nil CFunc.last_error
end.join
end end
end end
end end