From: Robert Klemme Date: 2012-04-24T18:08:46+09:00 Subject: Re: gem-packed script with DATA section does not work On Tue, Apr 24, 2012 at 11:01 AM, Wybo Dekker wrote: > On 2012-04-24 10:53, Xavier Noria wrote: >> I you don't need the BEGIN block nor constants, I think you could just use some ordirary heredocs or some other conventional Ruby idiom. > > sure, but as said in my initial mail, it's not very elegant to clog a > script with large blocks of erb templates... I agree to Xavier, it's not such a big difference. Just do # single quotes are important! MY_DATA = <<'DAT' doc is here DAT And if you place it at the end of the script you have pretty much the same as with __END__ - plus, you can even define more documents that way. You could also do MY_DATA = %q{ doc is here } MY_DATA = %q[ doc is here ] etc. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/