Hi

I am playing around in irb and find the following abnormal behaviour with 
the 'singleton' library distributed together with 1.6.4
I do not know whom to report to, therefore I post it here.

require 'singleton'
class Test
  include Singleton
  def initialize
    @thread = Thread.new { sleep 10 }
  end
end

test = Test.instance

Problem:  control does not return to the main thread until the new thread 
created becomes dead after 10 seconds

The following code which manually incorporates the singleton pattern works 
ok.  Control returns to the main thread immediately after the 
instantialization of the singleton object Test.  And the newly created 
thread continues to execute until dead after 10 seconds

class Test
  private_class_method :new
  @@singleton = nil
  def Test.instance
    @@singleton = new if @@singleton == nil
    return @@singleton
  end
  def initialize
    @thread = Thread.new { sleep 10 }
  end
end

test = Test.instance


Regards
Alan Tsang