[前][次][番号順一覧][スレッド一覧]

ruby-changes:16164

From: usa <ko1@a...>
Date: Wed, 2 Jun 2010 19:11:36 +0900 (JST)
Subject: [ruby-changes:16164] Ruby:r28126 (ruby_1_9_2): merge from trunk (r28125)

usa	2010-06-02 19:11:30 +0900 (Wed, 02 Jun 2010)

  New Revision: 28126

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28126

  Log:
    merge from trunk (r28125)
    
    * 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:
    branches/ruby_1_9_2/test/dl/test_cfunc.rb

Index: ruby_1_9_2/test/dl/test_cfunc.rb
===================================================================
--- ruby_1_9_2/test/dl/test_cfunc.rb	(revision 28125)
+++ ruby_1_9_2/test/dl/test_cfunc.rb	(revision 28126)
@@ -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/

[前][次][番号順一覧][スレッド一覧]