From: Peter Zotov Date: 2012-01-27T04:49:47+09:00 Subject: Re: uninitialized thread error with a Thread subclass Michel G. писал 26.01.2012 23:43: > Hi. I've encountered this problem lately : > > wally.rb : > #!/usr/bin/ruby > > class Goal < Thread > def initialize > puts "i'm a Goal" > end > > end > > dibi = Goal.new { puts "i'm dibi" } > > gives > > i'm a Goal > wally.rb:10:in `new': uninitialized thread - check `Goal#initialize' > (ThreadError) > from wally.rb:10 > Add `super' call within your `initialize' method. > > I'm running ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] on > Ubuntu 10.04. Tried purging-installing ruby, to no avail. > Upgraded to ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux] on > Ubuntu 10.10, same error. Consider upgrading to Ruby 1.9. Ruby 1.8.7 is more than 3 years old, and it will soon be discontinued. -- WBR, Peter Zotov.