Hi, --- David Alan Black <dblack / wobblini.net> wrote: > Hi -- > > Simon Strandgaard <neoneye / adslhome.dk> writes: > > > Felix Nawothnig wrote: > > > On 05/30/2004 11:21:58 PM, Simon Strandgaard > wrote: > > > > Ruby outputs lots of warnings.. what about > getting rid of these first? > > > > > > Looked through it - they are not related to my > problem. The lines > > > causing warnings work exactly as they are > supposed to. > > > > > > > Another thing is that you make heavy usage of > the upper ASCII range > > > > 128-255, this may cause different behavier > with different locale. > > > > > > Maybe it would cause outputting some strange > chars - but certaintly not > > > the problem I'm encountering. > > > > Some other issues I see, which could be dangerous. > > > > 'evolution.rb', you use bind/call/ancestors in a > creative way. > > Your Object#evolve are also suspicious. > > If I were you I would unittest this file > carefully. > > > > 'noun.rb', Kernel.send/define_method. > > Also suspicious to me. > > > > 'basicthing.rb' send feels kludgy. > > > > It isn't clear to me what is going on, because of > the above > > things you are using. I would try to use OOP, > rather than > > Kernel.send/bind.. etc. > > Not a big fan of introspection and/or intercession, > I guess :-) In any > case I think there's more to it than this -- after > all, those are > perfectly legitimate Ruby techniques, and although > they can be used > incorrectly, using them does not fully explain why > this change: > > $ diff basicthing.rb basicthing.rb.changed > 315c315 > < #puts "Heisenbug!" > --- > > puts "Heisenbug!" > > would cause a dramatic difference in runtime > behavior (in Ruby 1.8.1). > If Ruby's comment-parsing changes as a result of > using send, I think > it's in everyone's interest to be aware of this :-) > > (Not that I know exactly what's happening -- I wish > I did -- still > scrutinizing it....) I think it's the Hash. Specifically, the order of its elements. By putting some code like puts "Heisenbug!" or by removing it #puts "Heisenbug!" Ruby can change the order of the Hash elements, thus causing some bug (which isn't a bug of Ruby, of course :) to appear. This is interesting because a "perfect" code can "become" buggy anytime. Philosophically, it's interesting. :-) Cheers, Joao __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/