From: Alex Young Date: 2007-06-12T01:47:48+09:00 Subject: Re: Custom Mutex methods undefined by fastthread MenTaLguY wrote: > On Mon, 11 Jun 2007 23:21:29 +0900, Alex Young > wrote: >> As you can see, the method definition prior to the fastthread >> require is lost. This wasn't a problem with 0.6.4, but is a >> problem with 1.0. Is this a genuine bug, or is there a good reason >> for this? > > In 1.0, the old Mutex class is swapped out and replaced with a fresh > one when fastthread is included. This was necessary to permit > requiring fastthread after thread had already been required > (RubyGems, for example, needed this). If the classes weren't > swapped, then any pre-existing mutexes would suddenly end up with new > method definitions, breaking them. I see... And there's no easy way to tell if Mutex has been modified in user code before that, so you couldn't even raise a warning in that case... Hum. Still, at least Google knows about it now, for posterity :-) -- Alex