From: Han Holl Date: 2006-11-09T23:09:06+09:00 Subject: Re: Autoload problem in 1.8.5 On 11/9/06, Lyle Johnson wrote: > On 11/9/06, Han Holl wrote: > > > It has nothing to do with FXRuby. > > What David was trying to say (I think) is that a change was introduced > in Ruby 1.8.5 that caused Ruby to start spewing "Already initialized > constant" messages whenever you try to load FXRuby. You may be seeing > another symptom of the same problem, just in a different context. > > For more information, see this bug report: > > http://rubyforge.org/tracker/?func=detail&aid=5701&group_id=426&atid=1698 > > Hope this helps, > If you do a diff of eval.c from 1.8.4 to 1.8.5, this is part of it: @@ -7017,12 +7145,11 @@ ruby_safe_level = safe; found = search_required(fname, &feature, &path); if (found) { - if (!path || load_wait(RSTRING(path)->ptr)) { + if (!path || load_wait(RSTRING(feature)->ptr)) { result = Qfalse; } else { ruby_safe_level = 0; - rb_provide_feature(feature); switch (found) { case 'r': /* loading ruby library should be serialized. */ @@ -7045,6 +7172,7 @@ rb_ary_push(ruby_dln_librefs, LONG2NUM(handle)); break; } + rb_provide_feature(feature); result = Qtrue; } } I reverted the last patch (put rb_provide_feature(feature); at the top again) and everything seems fine. And yes, it's possible that FXRuby is bitten by this as well. Of course, someone, probably Nobuyoshi Nakada, didn't push this line to the bottom for nothing, so I probably broke something else with my reversion. I guess this has to do with it (from Changelog): Sat Jul 15 23:50:12 2006 Nobuyoshi Nakada * eval.c (rb_require_safe): wait for another thread requiring the same feature. fixed: [ruby-core:08229] but I could be totally wrong here. Cheers, Han Holl