Hi,
I just experimented with some thread code in Ruby 1.9 HEAD and discovered hat there is a change in the Thread constructor since 1.8; the initialize ethod is never called.
In 1.8, you could derive classes from threads and the initialize method was called in your thread before the thread was started. E.g. this code would work:
class MyThread < Thread
def initialize(&r)
@some_instance = 1234
super
end
end
The initialize method is _not_ called in 1.9, and when examining thread.c an see that there is no call to rb_obj_call_init.
Does anyone know whether this is a deliberate design choice in 1.9, or is t a mistake that should be corrected?
Best regards,
Tommy Jensen