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