So…you’ve got multiple threads in ruby and then you do

require ‘rexml’

REXML::Document

and it doesn’t work? What?

Turns out that what may have happened is some other thread got to its require ‘rexml’ and is in the middle of loading it. The second got to require ‘rexml’ skipped right past it, since it was in the process of loading it, and then blew right up. At least I think so.

Phew that was scary!

Doesn’t answer all of ruby’s weirdness…but some.

refs:

http://www.mail-archive.com/mongrel-users@rubyforge.org/msg00243.html

http://groups.google.com/group/rubyonrails-core/browse_thread/thread/ff25b78c21766492

http://www.daniel-azuma.com/blog/view/z4oi2c3bf8t16s/ruby_threads_and_kernel_require