From: Gavin Sinclair Date: 2003-01-16T01:30:04+09:00 Subject: Re: ruby-dev summary 19198-19345 On Thursday, January 16, 2003, 3:18:34 AM, Joel wrote: >> [Dave suggested:] >> s = <<|Now is the time >> | For all good men >> | to code Ruby >> p s.length >> >> So any line that _doesn't_ start with the given delimiter (ignoring >> leading whitespace) ends the string. > Of course, then you lose being able to use FOO in an expression irb(main):001:0>> s = < irb(main):002:0" foo > irb(main):003:0" FOO > " foo\nbar" > But I never used that much anyway. If I had to choose between this and > Dave's suggestion, I'd choose the latter. It's very clear. Would there be any way to achieve normal indentation with this approach? How about s = <<| | Now is the time | For all good men | to code Ruby But anyway, "FOO" isn't dead yet. You may not use the "plus bar" example above, but what about this? (Again, you may not use it, but I'm sure it's used somewhere.) foo "one", "two" # simple text foo <<-END1, <<-END2 # multi-line text Abraham END1 Lincoln END2 Hey, I don't use it either, but I can't see this being dropped from the language all of a sudden. Gavin