From: Leslie Viljoen Date: 2006-07-07T04:55:15+09:00 Subject: Re: Ruby plugin in EasyEclipse On 7/6/06, Damaris Fuentes wrote: > Well... now I have another problem... > > I write: > > ******************** > def wipe_mutterings_from( sentence ) > unless sentence.respond_to? :include? > raise ArgumentError, "cannot wipe mutterings from a #{ > sentence.class }" > end > while sentence.include? '(' > open = sentence.index( '(' ) > close = sentence.index( ')', open ) > sentence[open..close] = '' if close > end > end > > $stdout.sync = true > what_he_said = "But, strangely (em-pithy-dah),I learned upon." > wipe_mutterings_from( what_he_said ) > print what_he_said > > wipe_mutterings_from( 123 ) > print what_he_said > ***************** > Theoretically, the console has to show the "what he said" sentence and > then the error... However, it occurs the other way round, even with the > $stdout set to true. Suggestions will be welcome :D It may be that errors are being sent out of stderr instead of stdout. In that case you'd also need: $stderr.sync = true You can find a list of these global ($) variables here: http://www.zenspider.com/Languages/Ruby/QuickRef.html Les