From: Christian Neukirchen Date: 2005-09-11T01:15:05+09:00 Subject: Re: RCR to modify #puts and #print inside ERB James Edward Gray II writes: > On Sep 10, 2005, at 9:40 AM, David A. Black wrote: > >> Hi -- >> >> On Sat, 10 Sep 2005, Gavin Kistner wrote: >> >> >>> Proposed RCR: >>> >>> Modify ERB so that calls to #puts, #print, and #p inside the >>> template append the resulting string onto the local ERB output >>> variable, instead of sending the output to $stdout. #warn would >>> still send to STDERR (for debug messages seen but kept out of the >>> result string) and $stdout#<< could also be used. >>> >>> Does anyone have any compelling reason why I should not make the >>> above RCR? I'll flesh it out as a proper RCR, citing the ruby-talk >>> threads with users wondering why it doesn't work as they expected. >>> >> >> I can't think of any reason to do this other than the fact that people >> who haven't learned how to use ERB expect it, and I don't consider >> that a compelling reason. > > I have to agree. There's no advantage to having puts() work, since > you can just slap in the text itself with ERb tags as needed. I > personally think it's better that people confused by this aspect ask > here and get corrected, than it is to break puts() for them. +1 > James Edward Gray II -- Christian Neukirchen http://chneukirchen.org