なかだです。

At Sat, 15 Sep 2001 23:39:34 +0900,
matz / ruby-lang.org (Yukihiro Matsumoto) wrote:
> これもねえ。そういうものだと思うか、スレッド独立ローカル変数
> のフレームワークを作るかどちらかでないとやってられない気がし
> ます。でも、$_にしてもflipにしても、相当「Rubyらしくない」部
> 分なので苦労したくないというのが正直なところです。

 やってみましたが、でかいです。

  def test_threadscope_flip2
    sub = []
    2.times do |i|
      Thread.start do
	sub << proc do |x|
	  x if (x==1)...(x==3)
	end
      end.join
    end
    assert_equal(nil, sub[0].call(0))
    assert_equal(1, sub[0].call(1))
    assert_equal(nil, sub[1].call(2))
    assert_equal(nil, sub[1].call(3))
    assert_equal(1, sub[1].call(1))
    assert_equal(3, sub[0].call(3))
    assert_equal(nil, sub[0].call(3))
    assert_equal(3, sub[1].call(3))
  end


begin 644 fvar.patch.bz2.uu M0EIH.3%!629367.!I8D`$"Y?@'@P?________^Z__]_O8!;>\#TO9/LK[W;> MO/??.[XPW=UUQWO=[YSXJN]`/6VK>^(44^K=<NLH&5:HU:PI0VP;:K8:%;,@ ME"""3:938BGZF%&93"9&FF@#U`````-/4&F@@$TFBGIHB:?J0`T:&30-&@`- M````---$T4)`T9`#30>HT:#30#U``````$FE"1-&A--&@(S4RC:3U&U#0!H! MIZAD,@`T`BA4VA-4\IZGZ*FRGM34T]3>J>H/4T`]0/1`-#0!H#U`!$D0(`"3 M"--`4VF43VJ!H,FF)D]0#RFFFC&46%5=IGS%-5)@PG-R0VN`M8J"JM$Q$TQ) MB-B8*52B,25P89:Q$*R&&(LRC]-\G:^<[?F_9]+42TW0YD>6EYKS"8<R7*", ME,8F,%&RF)2HJXMB5;+B+7%%F!Q#"*HX*"643$0_[Q=OZY+,L%%]S-T&9:-E M'*.`S:8[2S*9T4UW,XP9LK7*2YHB**PMBJ_P2B69$AW8/+MYQ`P$9+RZ<WB! M.:59Y9&2*,S,%SG(X7+G-F&C,%03TXW,,L_?\5SF[7GQM:&1&(;TTR'!):6/ M/2BG.#-V818&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