From: Robert Klemme Date: 2004-04-29T00:34:11+09:00 Subject: Re: Deadlock in eval when $SAFE>=4 "Michael Witrant" schrieb im Newsbeitrag news:8248e2a3.0404280713.17ae835b@posting.google.com... > The following code produces a deadlock: > > $ cat test.rb > def foo bar = nil; end > Thread.new { $SAFE=4; eval("foo foo foo") }.value > > $ ruby18 -v test.rb > ruby 1.8.1 (2003-12-25) [i686-linux] > test.rb:2:in `value': Thread(0x401d1900): deadlock (fatal) > from test.rb:2 Funny... > It works well when $SAFE <= 3 or when the number of "foo" is <= 2. .... or when the string is syntactically correct: Thread.new { $SAFE=4; eval("foo; foo; foo") }.value robert