From: Trans Date: 2011-10-04T00:14:39+09:00 Subject: [ruby-core:39877] Re: Discussion results (here documents with indents) On Mon, Oct 3, 2011 at 9:27 AM, Nikolai Weibull wrote: > Why not implement it by checking the amount of leading whitespace on > the first line and strip that amount of whitespace from all subsequent > lines? ��String#margin should in that case also take an optional > Integer argument that states how many characters to strip from the > start of each line that is used instead of the heuristic method. Sure, I think that's #tabto. A very useful method. #margin, otoh, was written specifically to emulate the literal notation. I'm working on a blog post on the topic: http://trans.github.com/string/ruby/2011/10/02/string-iou.html I'm going to write up a post for each of the suggestions I made, to help explain them a little better.