From: HarryO Date: 2001-10-04T20:07:15+09:00 Subject: [ruby-talk:22078] Re: Marshal won't dump a Proc In article <20011004015927.A833@perception.phlo.org>, "Florian G. Pflug" wrote: > Did you know that " %{ .... }" is a string literal in ruby? Yes, I did know that, but I'm fairly sure that when I tried it, I got parse errors, presumably due to the appearance of "}" in the middle of some of the more complex blocks I wanted to use. However, I did find that using a "here" document worked just fine, > By using this, from the users point of view the only different to > passing a "real" block, instead of a string, would be that he has to > write a "%" before the curly brace. (and this it would act like a > closure, e.g. giving you access to the surrounding variables). I'm going to have another try using "%{ ... }", just in case the parse error I was due to some other problem I had at the time, because I agree, this would be a nicer syntax. Thanks for the comments.