From: Dan Doel Date: 2003-09-30T02:02:29+09:00 Subject: Re: Thoughts on yield 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. - Dan