On Wednesday 05 February 2003 02:44 pm, Hal E. Fulton wrote:

well, noting that all my ruby code, and i have a fair amount installed, falls 
in here  (i don't use usr/local/):

silver% cd /usr/lib/ruby
silver% grep -r -e '^.*<<-\w*\s*,.*$' ./

./site_ruby/1.6/amstd/const.rb:    eval <<-End, nil, __FILE__, __LINE__ + 1
./site_ruby/1.6/fileutils.rb:      module_eval <<-End, __FILE__, __LINE__ + 1
./site_ruby/1.6/fileutils.rb:      module_eval <<-End, __FILE__, __LINE__ + 1
./site_ruby/1.6/fileutils.rb:      module_eval <<-End, __FILE__, __LINE__ + 1
./1.6/net/protocol.rb:        module_eval <<-End, __FILE__, __LINE__ + 1
./1.6/forwardable.rb:    module_eval(<<-EOS, "(__FORWARDABLE__)", 1)
./1.6/forwardable.rb:    instance_eval(<<-EOS, "(__FORWARDABLE__)", 1)

silver% grep -r -e '^.*<<\w*,.*$' ./

./site_ruby/1.6/wise/source/xcolor.c:    0, NUM2INT(red)<<CS, 
NUM2INT(green)<<CS, NUM2INT(blue)<<CS, 0xff, 0
Binary file ./1.6/i386-linux/socket.so matches
./1.6/net/smtp.rb:        smtp.send_mail <<EndOfMail, 'your / mail.address', 
'to / some.domain'
Binary file ./1.6/i686-linux/socket.so matches

that makes 9. (and i note they are all apart of the ruby package itself)

why such the riff here? obviously it is not an oft used aspect of here docs, 
at least not in Ruby. personally i think here docs a PERLISM, anyway.

but that's not the point. the point is %L. how does the disimilarity of one 
construct invalidate the usefulness of another? moreover i offered a solution 
to this stated problem by using the deliminator to end the construct. but...

'i guess the' <<-EOS, 'was a better'
	| original
	| idea
	| of
	| Nobu's
EOS, 'idea?'

tes.rb:1: can't find string "EOS" anywhere before EOF
tes.rb:1: parse error

anyway, i understand if there is a programming difficulty with implementation. 
other than that, i think %L a very classy construct. too bad no one else 
seems to think so.

-- 
tom sawyer, aka transami
transami / transami.net