yarv-dev:835
From: sheepman <sheepman sheepman.sakura.ne.jp>
Date: Sat, 11 Feb 2006 10:48:36 +0900
Subject: [yarv-dev:835] open> $& and other variables in proc are not thread local
こんにちは、sheepman です。 On Fri, 10 Feb 2006 08:47:06 +0900 SASADA Koichi <ko1 atdot.net> wrote: > ささだです。 > > sheepman wrote: > > バグか未実装かよくわからないのですが、$~, $&, $1 などの組み込み変数が > > ruby-1.9 と違ってスレッドローカルではありません。 > > スレッドローカルにするようにしました。 > まだ ruby-1.9 と違うようです。 次のように proc を作って別のスレッドで呼ぶと、$~, $&, $1 などの 組み込み変数が ruby-1.9 と違ってスレッドローカルではありません。 $ cat t.rb /(.)/ =~ "a" b = Thread.new{ proc do p $~, $&, $1 end }.value b.call $ ./miniruby -v t.rb ruby 1.9.0 (2006-02-09) [i686-linux] YARVCore 0.3.3 (rev: 378) [opts: ] #<MatchData:0x402977bc> "a" "a" $ ruby-1.9 -v t.rb ruby 1.9.0 (2006-02-09) [i686-linux] nil nil nil -- sheepman / TAMURA Takashi sheepman sheepman.sakura.ne.jp http://sheepman.parfait.ne.jp/ -- ML: yarv-dev quickml.atdot.net 使い方: http://www.atdot.net/~ko1/quickml
830 2006-02-09 09:20 [sheepman sheepman.sa] open> $& and other variables are not thread local 832 2006-02-10 08:47 ┗[ko1 atdot.net ] fixed> Re: open> $& and other variables are not thread local -> 835 2006-02-11 10:48 ┗[sheepman sheepman.sa] open> $& and other variables in proc are not thread local 836 2006-02-11 11:08 ┗[ko1 atdot.net ] 844 2006-02-12 15:13 ┗[sheepman sheepman.sa]