From: sheepman Date: 2007-03-11T23:39:59+09:00 Subject: [ruby-dev:30530] dl/import is not thread safe こんばんは、sheepman です。 ほとんど問題になる場合はないと思うのですが、 dl/import の以下の部分がスレッド安全ではないので、 パッチを添付します。 @retval が返される前に、別のスレッドで @retval の値を 変えられる可能性があると思います。 $ svn diff ext/dl/lib/dl/import.rb Index: ext/dl/lib/dl/import.rb =================================================================== --- ext/dl/lib/dl/import.rb (revision 12023) +++ ext/dl/lib/dl/import.rb (working copy) @@ -87,7 +87,7 @@ " rs = dec.call(rs) if (dec && rs)", " @retval = r", " @args = rs", - " @retval", + " r", "}", ].join("\n")) @@ -169,7 +169,7 @@ " rs = dec.call(rs) if dec", " @retval = r", " @args = rs", - " return @retval", + " return r", "end", "module_function :#{mname}", ].join("\n") -- sheepman / TAMURA Takashi sheepman@sheepman.sakura.ne.jp