From edb751ca4d2b7513fa1bdd4df067fd59c98680a2 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 28 Sep 2007 19:04:45 +0000 Subject: * cont.c: Thread local storage should be fiber local. * bootstraptest/test_knownbug.rb, test/ruby/test_fiber.rb: move a fixed test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_knownbug.rb | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'bootstraptest') diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 20533fa1b..259ebc21f 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -13,31 +13,3 @@ assert_finish 1, %q{ w.write "a" }, '[ruby-dev:31866]' -assert_equal "[[nil, 1, 3, 3, 1, nil, nil], [nil, 2, 2, nil]]", %q{ - def tvar(var, val) - old = Thread.current[var] - begin - Thread.current[var] = val - yield - ensure - Thread.current[var] = old - end - end - ary1 = [] - ary2 = [] - fb = Fiber.new { - ary2 << Thread.current[:v]; tvar(:v, 2) { - ary2 << Thread.current[:v]; Fiber.yield - ary2 << Thread.current[:v]; } - ary2 << Thread.current[:v]; Fiber.yield - ary2 << Thread.current[:v] - } - ary1 << Thread.current[:v]; tvar(:v,1) { - ary1 << Thread.current[:v]; tvar(:v,3) { - ary1 << Thread.current[:v]; fb.resume - ary1 << Thread.current[:v]; } - ary1 << Thread.current[:v]; } - ary1 << Thread.current[:v]; fb.resume - ary1 << Thread.current[:v]; - [ary1, ary2] -} -- cgit