From: Robert Klemme Date: 2012-12-03T23:37:18+09:00 Subject: Re: system is silently coming out in error with thread.join On Mon, Dec 3, 2012 at 3:18 PM, Prog Rammer wrote: > There are two rb files: > > run_work.rb > ---------- > #some code here > children=[] > str="ruby work.rb" > children< system(str) > end > children.each do |c| > c.join > end > puts 'third' > #some code here > > > work.rb > ------ > children=[] > children< #some code here > end > puts 'first' > children.each do |c| > c.join ############## 'alpha' > puts 'DONE!' > end > puts 'second' > > ============================================== > If I run run_work.rb, I see output as: > first > third > > Where did 'second go'? I'd say this is your problem: $ ruby -e Thread.new -e:1:in `initialize': must be called with a block (ThreadError) from -e:1:in `new' from -e:1:in `
' Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/