ruby-changes:16163
From: usa <ko1@a...>
Date: Wed, 2 Jun 2010 16:49:06 +0900 (JST)
Subject: [ruby-changes:16163] Ruby:r28125 (trunk): * test/dl/test_cfunc.rb (test_last_error): CFunc.last_error is thread local
usa 2010-06-02 16:49:00 +0900 (Wed, 02 Jun 2010) New Revision: 28125 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28125 Log: * 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. Modified files: trunk/test/dl/test_cfunc.rb Index: test/dl/test_cfunc.rb =================================================================== --- test/dl/test_cfunc.rb (revision 28124) +++ test/dl/test_cfunc.rb (revision 28125) @@ -65,10 +65,12 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/