From: Hal Fulton Date: 2003-09-30T02:57:40+09:00 Subject: Re: Thoughts on yield Dan Doel wrote: > Sabby and Tabby wrote: > >> ('a'..'g').each {|x| eval <<""} >> def #{x}(*a) >> @lines << [] if a.empty? >> @lines[-1].unshift('#{x}') >> end >> >> > I didn't realize that the first line didn't count for here documents, so > you > could close blocks and such. I thought you would have needed: > > ('a'..'g').each {|x| eval <<"" > def #{x}(*a) > @lines << [] if a.empty? > @lines[-1].unshift('#{x}') > end > > } > > You learn something new every day, I guess. What? I'm confused. Are you saying that there are two blank lines required at the end of this doc? Personally I've never used "" as a terminator anyway. Hal