From: David Alan Black Date: 2004-05-31T08:03:39+09:00 Subject: Re: [BUG?] Behavior of application changes when adding non-relevant puts Hi -- Simon Strandgaard 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....) David -- David A. Black dblack@wobblini.net